Versions in this module Expand all Collapse all v1 v1.3.8 Aug 17, 2022 v1.3.7 Jul 11, 2022 Changes in this version + const SCP_PUSH_BEGIN_END_FOLDER + const SCP_PUSH_BEGIN_FILE + const SCP_PUSH_BEGIN_FOLDER + const SCP_PUSH_END + const SCP_PUSH_END_FOLDER + func GetPerm(f *os.File) (perm string) + type Client struct + func Dial(network, addr string, config *ssh.ClientConfig) (*Client, error) + func DialWithKey(addr, user, keyfile string) (*Client, error) + func DialWithKeyWithPassphrase(addr, user, keyfile string, passphrase string) (*Client, error) + func DialWithPasswd(addr, user, passwd string) (*Client, error) + func (c *Client) Close() error + func (c *Client) Cmd(cmd string) *RemoteScript + func (c *Client) Download(remotePath string, localPath string) (err error) + func (c *Client) NewSftp(opts ...sftp.ClientOption) (*sftp.Client, error) + func (c *Client) Script(script string) *RemoteScript + func (c *Client) ScriptFile(fname string) *RemoteScript + func (c *Client) Shell() *RemoteShell + func (c *Client) Terminal(config *TerminalConfig) *RemoteShell + func (c *Client) UnderlyingClient() *ssh.Client + func (c *Client) Upload(localPath string, remotePath string) (err error) + type RemoteScript struct + func (rs *RemoteScript) Cmd(cmd string) *RemoteScript + func (rs *RemoteScript) Output() ([]byte, error) + func (rs *RemoteScript) Run() error + func (rs *RemoteScript) SetStdio(stdout, stderr io.Writer) *RemoteScript + func (rs *RemoteScript) SmartOutput() ([]byte, error) + type RemoteShell struct + func (rs *RemoteShell) SetStdio(stdin io.Reader, stdout, stderr io.Writer) *RemoteShell + func (rs *RemoteShell) Start() error + type Scp struct + func NewScp(clientConn *ssh.Client) *Scp + func (scp *Scp) PullFile(srcpath, targetFile string) error + func (scp *Scp) PushDir(src string, dest string) error + func (scp *Scp) PushFile(src string, dest string) error + type TerminalConfig struct + Height int + Modes ssh.TerminalModes + Term string + Weight int