Documentation ¶
Overview ¶
Package ssh is a simple wrapper around an ssh.Client which implements utilities to be performed with a remote server.
Index ¶
- type Client
- func (sshc *Client) Close() error
- func (sshc *Client) Download(src string, dst io.Writer, sudo bool) error
- func (sshc *Client) RunCommand(cmd string) ([]byte, error)
- func (sshc *Client) StartCommand(cmd string) error
- func (sshc *Client) Upload(src io.Reader, dst string, sudo bool) ([]byte, error)
- func (sshc *Client) UploadFile(src, dst string, sudo bool) ([]byte, error)
- type ExtAgent
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is a wrapper type over a ssh connection that takes care of creating a channel and running commands in a single method.
func (*Client) RunCommand ¶
RunCommand runs a given command in a new ssh session.
func (*Client) StartCommand ¶
StartCommand starts a given command in a new ssh session. Unlike RunCommand this command does not wait command to finish. This is needed for running commands in the background.
type ExtAgent ¶
type ExtAgent struct {
// contains filtered or unexported fields
}
ExtAgent is a wrapper type over agent.ExtendedAgent provding a method to return a Client.
Click to show internal directories.
Click to hide internal directories.