Documentation
¶
Index ¶
- Constants
- func SftpSendFile(sftpClient *sftp.Client, localFile string, remoteFile string) error
- func SshConnect(addr string, user string, password string, needSftp bool, execFn SshExecFunc) (err error)
- func SshExec(sshClient *ssh.Client, command string, wait ...bool) (string, error)
- type SshExecFunc
- type UtilSshClient
- func (c *UtilSshClient) Close()
- func (c *UtilSshClient) Connect(addr string, user string, password string, timeout ...time.Duration) (err error)
- func (c *UtilSshClient) Exec(command string, wait ...bool) (output string, err error)
- func (c *UtilSshClient) SendFile(localFile string, remoteFile string) (err error)
- func (c *UtilSshClient) UseProxySocks5(proxyAddr string, proxyUser string, proxyPassword string) (err error)
Constants ¶
View Source
const PROXY_TYPE_SOCKS5 = "socks5"
Variables ¶
This section is empty.
Functions ¶
func SftpSendFile ¶
func SshConnect ¶
Types ¶
type UtilSshClient ¶
type UtilSshClient struct {
// contains filtered or unexported fields
}
func NewSshClient ¶
func NewSshClient() (client *UtilSshClient)
func (*UtilSshClient) Close ¶
func (c *UtilSshClient) Close()
func (*UtilSshClient) Exec ¶
func (c *UtilSshClient) Exec(command string, wait ...bool) (output string, err error)
func (*UtilSshClient) SendFile ¶
func (c *UtilSshClient) SendFile(localFile string, remoteFile string) (err error)
func (*UtilSshClient) UseProxySocks5 ¶
func (c *UtilSshClient) UseProxySocks5(proxyAddr string, proxyUser string, proxyPassword string) (err error)
Click to show internal directories.
Click to hide internal directories.