Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrAuthFailure = errors.New("failed authentication") ErrTimeout = errors.New("timeout") )
Functions ¶
This section is empty.
Types ¶
type Option ¶
type Option func(*SSHClient)
func WithHostKeyCallback ¶
WithHostKeyCallback sets the SSHClient's initializes the client with an allow list of known trusted hosts.
func WithPrivateKey ¶
WithPrivateKey sets SSHClient's private key.
func WithTimeout ¶
WithTimeout sets SSHClient's timeout value.
type SSHClient ¶
type SSHClient struct {
// contains filtered or unexported fields
}
SSHClient holds the elements to setup an SSH client
func NewClient ¶
NewClient is a factory function that takes in SSH parameters and returns a new client
func (*SSHClient) Run ¶
Run takes in a command and attempts to establishe a remote session and run the command.
Click to show internal directories.
Click to hide internal directories.