Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SSHCommandResult ¶
SSHCommandResult is the result of executing a command via SSH. Upon success the Err wil be nil, upon failure, the Err will be set, and the SSHOutput may also be set, depending on the failure. Using this instead of returning (string, error) from SSHCommand() makes the code much cleaner and simpler when calling SSHCommand() asynchronously with a channel.
func SSHCommand ¶
func SSHCommand(command, sshAddrStr, user, hostPrivateKeyPath string) *SSHCommandResult
SSHCommand Executes a command on a remote host via ssh. For the ssh to work, the ssh privateKey from the test executor has to have already been added to the ~/.ssh/authorized_keys file on the remote host. The format of sshAddrStr is "192.168.10.3:22".
Click to show internal directories.
Click to hide internal directories.