Documentation ¶
Overview ¶
Package sshclient provides a simple SSH client that uses password authentication for now. It contains functions for starting an interactive shell, running commands remotely and copying files to and from remote hosts.
Index ¶
- type SSHClient
- func (sc *SSHClient) CopyFrom(address string, remotePath string, localPath string, recurseDir bool) error
- func (sc *SSHClient) CopyTo(address string, localPath string, remotePath string, recurseDir bool) error
- func (sc *SSHClient) RunInteractiveShell(address string)
- func (sc *SSHClient) RunWithResults(address string, command string) (string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SSHClient ¶
type SSHClient struct {
// contains filtered or unexported fields
}
SSHClient represents a simple SSH client, which uses password authentication.
func NewWithPassword ¶
NewWithPassword creates a new SSH client with password authentication, and no host key check.
func (*SSHClient) CopyFrom ¶
func (sc *SSHClient) CopyFrom(address string, remotePath string, localPath string, recurseDir bool) error
CopyFrom copies a file or directory from the specified address.
func (*SSHClient) CopyTo ¶
func (sc *SSHClient) CopyTo(address string, localPath string, remotePath string, recurseDir bool) error
CopyTo copies a local file or directory to the specified address.
func (*SSHClient) RunInteractiveShell ¶ added in v0.2.0
RunInteractiveShell connects to the specified address and runs an interactive shell.
Click to show internal directories.
Click to hide internal directories.