Versions in this module Expand all Collapse all v0 v0.1.1 Nov 28, 2018 Changes in this version + func CreateKeyPair() (publicKeyBytes []byte, privateKeyBytes []byte, err error) + func CreateTempFileFromString(content string, filemode os.FileMode) (*os.File, error) + func ExtractRetCode(err error) (string, int, error) + func GetBashLibrary() (string, error) + func IsSCPRetryable(code int) bool + func IsSSHRetryable(code int) bool + func SCPErrorString(retcode int) string + func SSHErrorString(retcode int) string + type SSHCommand struct + func (c *SSHCommand) CombinedOutput() ([]byte, error) + func (c *SSHCommand) Kill() error + func (c *SSHCommand) Output() ([]byte, error) + func (c *SSHCommand) Run() (int, string, string, error) + func (c *SSHCommand) Start() error + func (c *SSHCommand) StderrPipe() (io.ReadCloser, error) + func (c *SSHCommand) StdinPipe() (io.WriteCloser, error) + func (c *SSHCommand) StdoutPipe() (io.ReadCloser, error) + func (c *SSHCommand) Wait() error + type SSHConfig struct + GatewayConfig *SSHConfig + Host string + LocalPort int + Port int + PrivateKey string + User string + func (ssh *SSHConfig) Command(cmdString string) (*SSHCommand, error) + func (ssh *SSHConfig) CommandContext(ctx context.Context, cmdString string) (*SSHCommand, error) + func (ssh *SSHConfig) Copy(remotePath, localPath string, isUpload bool) (int, string, string, error) + func (ssh *SSHConfig) CreateTunnels() ([]*SSHTunnel, *SSHConfig, error) + func (ssh *SSHConfig) Enter() error + func (ssh *SSHConfig) Exec(cmdString string) error + func (ssh *SSHConfig) SudoCommand(cmdString string) (*SSHCommand, error) + func (ssh *SSHConfig) WaitServerReady(timeout time.Duration) error + type SSHTunnel struct + func (tunnel *SSHTunnel) Close() error