Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConfigureCredentials ¶
func ConfigureCredentials(username string, keypath string) (*ssh.ClientConfig, error)
ConfigureCredentials returns the ClientConfig struct to be used as part of the SSHClient definition
func RunBashInteractive ¶
func RunBashInteractive()
RunBashInteractive allows the user to configure the SSH client interactively and executes /bin/bash on the remote host specified interactively by the user
Types ¶
type SSHClient ¶
SSHClient wraps the ssh client configuration and the host/port information
func CreateClient ¶
func CreateClient(sshConfig *ssh.ClientConfig, ipAddr string, port int) *SSHClient
CreateClient takes a *ssh.ClientConfig struct as input, ipAddress of the target machine and the ssh port, and returns an *SSHClient where a command can be Run on
func (*SSHClient) CloseSession ¶
func (client *SSHClient) CloseSession()
CloseSession closes the session for the client
func (*SSHClient) InitSession ¶
InitSession returns a session initialised with the given params
Click to show internal directories.
Click to hide internal directories.