Versions in this module Expand all Collapse all v0 v0.1.1 Aug 15, 2026 Changes in this version + func IsAuthFailure(err error) bool v0.1.0 Aug 14, 2026 Changes in this version + const DefaultCols + const DefaultDialTimeout + const DefaultMaxDials + const DefaultPingTimeout + const DefaultRows + const DefaultTerm + const StageHandshake + const StageHostKey + const StageNetwork + var ErrAuthRequired = errors.New("sshx: at least one auth method required") + var ErrClosed = errors.New("sshx: closed") + var ErrHostKeyRequired = errors.New("sshx: host key policy required") + var ErrNotReady = errors.New("sshx: connection not ready") + func InsecureAcceptAny() ssh.HostKeyCallback + func KnownHosts(path string) (ssh.HostKeyCallback, error) + func TOFU(path string, confirm ConfirmHostFunc) (ssh.HostKeyCallback, error) + type Client struct + func Dial(ctx context.Context, addr string, cfg Config) (*Client, error) + func (c *Client) Close() error + func (c *Client) CombinedOutput(ctx context.Context, cmd string) (string, error) + func (c *Client) Output(ctx context.Context, cmd string) (Result, error) + func (c *Client) Ping(ctx context.Context) error + func (c *Client) Shell(ctx context.Context, cfg SessionConfig) (*Session, error) + type Config struct + Auth []ssh.AuthMethod + HostKey ssh.HostKeyCallback + User string + type ConfirmHostFunc func(h HostInfo) (bool, error) + type DialError struct + Addr string + Err error + Stage string + func (e *DialError) Error() string + func (e *DialError) Unwrap() error + type HostInfo struct + Fingerprint string + Host string + Key ssh.PublicKey + KeyType string + Remote net.Addr + type HostKeyMismatchError struct + Fingerprint string + Host string + KeyType string + func (e *HostKeyMismatchError) Error() string + type Managed struct + func (m *Managed) Client() *Client + func (m *Managed) Close() + func (m *Managed) CombinedOutput(ctx context.Context, cmd string) (string, error) + func (m *Managed) Err() error + func (m *Managed) Output(ctx context.Context, cmd string) (Result, error) + func (m *Managed) State() State + type ManagedConfig struct + Dial func(ctx context.Context) (*Client, error) + OnStateChange func(s State, err error) + type Pool struct + func NewPool(maxConcurrentDials int) *Pool + func (p *Pool) Add(cfg ManagedConfig) *Managed + func (p *Pool) Close() + type Result struct + ExitCode int + Stderr []byte + Stdout []byte + type Session struct + func (s *Session) Close() error + func (s *Session) Resize(cols, rows int) error + func (s *Session) Wait() error + type SessionConfig struct + Stderr io.Writer + Stdin io.Reader + Stdout io.Writer + TTY *TTYConfig + type State int + const StateBroken + const StateClosed + const StateConnecting + const StateReady + func (s State) String() string + type TTYConfig struct + Cols int + Rows int + Term string + type UnknownHostKeyError struct + Fingerprint string + Host string + KeyType string + func (e *UnknownHostKeyError) Error() string