Documentation ¶
Index ¶
- type Client
- func BuildSSHClient(config Config) *Client
- func Dial(network, addr string, config *ssh.ClientConfig) (*Client, error)
- func DialWithKey(addr, user, keyfile string) (*Client, error)
- func DialWithKeyWithPassphrase(addr, user, keyfile string, passphrase string) (*Client, error)
- func DialWithPasswd(addr, user, passwd string) (*Client, error)
- type Config
- type Dialer
- type TerminalConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
func BuildSSHClient ¶
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 TerminalConfig ¶
type TerminalConfig struct { Term string Hight int Weight int Modes ssh.TerminalModes }
Click to show internal directories.
Click to hide internal directories.