Versions in this module Expand all Collapse all v0 v0.0.6 Aug 5, 2023 v0.0.5 Aug 5, 2023 v0.0.4 Aug 4, 2023 v0.0.3 Aug 4, 2023 v0.0.2 Aug 4, 2023 Changes in this version + var ErrPropSSHCommand = errorx.RegisterPrintableProperty("ssh_command") + var ErrPropSSHStderr = errorx.RegisterPrintableProperty("ssh_stderr") + var ErrPropSSHStdout = errorx.RegisterPrintableProperty("ssh_stdout") + var ErrSSHExecuteFailed = errNSSSH.NewType("execute_failed") + var ErrSSHExecuteTimedout = errNSSSH.NewType("execute_timedout") + func FindSSHAuthorizedKeysFile(ctx context.Context, exec ctxt.Executor) string + func New(etype SSHType, sudo bool, c SSHConfig, env []string) (ctxt.Executor, error) + func ScpDownload(session *ssh.Session, client *ssh.Client, src, dst string, limit int) error + type CheckPointExecutor struct + func (c *CheckPointExecutor) Execute(ctx context.Context, cmd string, sudo bool, timeout ...time.Duration) (stdout []byte, stderr []byte, err error) + func (c *CheckPointExecutor) Transfer(ctx context.Context, src, dst string, download bool, limit int) (err error) + type EasySSHExecutor struct + Config *easyssh.MakeConfig + Env []string + Locale string + Sudo bool + func (e *EasySSHExecutor) Execute(ctx context.Context, cmd string, sudo bool, timeout ...time.Duration) ([]byte, []byte, error) + func (e *EasySSHExecutor) Transfer(ctx context.Context, src, dst string, download bool, limit int) error + func (e *EasySSHExecutor) TransferTemplate(ctx context.Context, templateFile, dst, fileMode string, config interface{}, ...) error + type Local struct + Config *SSHConfig + Env []string + Locale string + Sudo bool + func (l *Local) Execute(ctx context.Context, cmd string, sudo bool, timeout ...time.Duration) ([]byte, []byte, error) + func (l *Local) Transfer(ctx context.Context, src, dst string, download bool, limit int) error + func (l *Local) TransferTemplate(ctx context.Context, templateFile, dst, fileMode string, config interface{}, ...) error + type NativeSSHExecutor struct + Config *SSHConfig + ConnectionTestResult error + Env []string + Locale string + Sudo bool + func (e *NativeSSHExecutor) Execute(ctx context.Context, cmd string, sudo bool, timeout ...time.Duration) ([]byte, []byte, error) + func (e *NativeSSHExecutor) Transfer(ctx context.Context, src, dst string, download bool, limit int) error + func (e *NativeSSHExecutor) TransferTemplate(ctx context.Context, templateFile, dst, fileMode string, config interface{}, ...) error + type SSHConfig struct + ExeTimeout time.Duration + Host string + KeyFile string + Passphrase string + Password string + Port int + Proxy *SSHConfig + Timeout time.Duration + User string + type SSHType string + var SSHTypeBuiltin SSHType = "builtin" + var SSHTypeNone SSHType = "none" + var SSHTypeSystem SSHType = "system"