Documentation
¶
Overview ¶
sshclient implements an ssh client
Index ¶
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
}
func Dial ¶
func Dial(network, addr string, config *ssh.ClientConfig) (*Client, error)
Dial starts a client connection to the given SSH server. This is wrap the ssh.Dial
func DialWithKey ¶
DialWithKey starts a client connection to the given SSH server with key authmethod.
func DialWithKeyWithPassphrase ¶
DialWithKeyWithPassphrase same as DialWithKey but with a passphrase to decrypt the private key
func DialWithPasswd ¶
DialWithPasswd starts a client connection to the given SSH server with passwd authmethod.
func (*Client) Shell ¶
func (c *Client) Shell() *remoteShell
Shell create a noninteractive shell on client.
func (*Client) Terminal ¶
func (c *Client) Terminal(config *TerminalConfig) *remoteShell
Terminal create a interactive shell on client.
type RemoteScript ¶
type RemoteScript struct {
// contains filtered or unexported fields
}
RemoteScript
func (*RemoteScript) Cmd ¶
func (rs *RemoteScript) Cmd(cmd string) *RemoteScript
func (*RemoteScript) Output ¶
func (rs *RemoteScript) Output() ([]byte, error)
func (*RemoteScript) SetStdio ¶
func (rs *RemoteScript) SetStdio(stdout, stderr io.Writer) *RemoteScript
func (*RemoteScript) SmartOutput ¶
func (rs *RemoteScript) SmartOutput() ([]byte, error)
type TerminalConfig ¶
type TerminalConfig struct { Term string Hight int Weight int Modes ssh.TerminalModes }
Click to show internal directories.
Click to hide internal directories.