Versions in this module Expand all Collapse all v0 v0.0.2 Jun 26, 2024 v0.0.1 Mar 19, 2019 Changes in this version + func GenKeyPair() (string, string, error) + func GetKeyPair(file string) (string, string, error) + func NewNativeConfig(user, clientVersion string, auth *Auth, hostKeyCallback ssh.HostKeyCallback) (ssh.ClientConfig, error) + type Auth struct + Keys []string + Passwords []string + RawKeys [][]byte + type Client interface + Output func(command string) (string, error) + Shell func(args ...string) error + Start func(command string) (io.ReadCloser, io.ReadCloser, error) + Wait func() error + func NewClient(cfg *Config) (Client, error) + func NewNativeClient(user, host, clientVersion string, port int, auth *Auth, ...) (Client, error) + type Config struct + Auth *Auth + Host string + HostKey ssh.HostKeyCallback + Port int + Timeout time.Duration + User string + Version string + type ExitError struct + Err error + ExitCode int + func (err *ExitError) Cause() error + func (err *ExitError) Error() string + type NativeClient struct + ClientVersion string + Config ssh.ClientConfig + Hostname string + Port int + func (client *NativeClient) Output(command string) (string, error) + func (client *NativeClient) OutputWithPty(command string) (string, error) + func (client *NativeClient) Shell(args ...string) error + func (client *NativeClient) Start(command string) (io.ReadCloser, io.ReadCloser, error) + func (client *NativeClient) Wait() error