Documentation ¶
Overview ¶
Package ssh provide a wrapper for golang.org/x/crypto/ssh and a parser for SSH client configuration specification ssh_config(5).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoadPrivateKeyInteractive ¶ added in v0.49.0
LoadPrivateKeyInteractive load private key from file. If key is encrypted, it will prompt the passphrase in terminal with maximum maxAttempt times. If the passphrase still invalid after maxAttempt it will return an error.
Types ¶
type Client ¶
Client for SSH connection.
func NewClientInteractive ¶ added in v0.49.0
NewClientInteractive create a new SSH connection using predefined configuration, possibly interactively.
This function may dial twice to find appropriate authentication method when SSH_AUTH_SOCK environment variable is set but no valid key exist and IdentityFile directive is specified in the Host section.
If the IdentityFile is encrypted, it will prompt for passphrase in terminal.
func (*Client) ScpGet ¶ added in v0.28.0
ScpGet copy file from remote into local storage using scp.
The local file should be use the absolute path, or relative to the file in config.Section.WorkingDir.
func (*Client) ScpPut ¶ added in v0.28.0
ScpPut copy a file from local storage to remote using scp command.
The local file should be use the absolute path, or relative to the file in config.Section's WorkingDir.
func (*Client) SetSessionOutputError ¶ added in v0.29.2
SetSessionOutputError set the standard output and error for future remote execution.
Directories ¶
Path | Synopsis |
---|---|
Package config provide the ssh_config(5) parser and getter.
|
Package config provide the ssh_config(5) parser and getter. |
Package sftp implement SSH File Transfer Protocol v3 as defined in draft-ietf-secsh-filexfer-02.txt.
|
Package sftp implement SSH File Transfer Protocol v3 as defined in draft-ietf-secsh-filexfer-02.txt. |