Documentation ¶
Index ¶
- func DialTCP(addr string, clientConfig *ssh.ClientConfig) (*ssh.Client, error)
- func NewSession(addr string, clientConfig *ssh.ClientConfig) (ssh.Conn, *ssh.Session, error)
- func PasswordKey(username, password string) *ssh.ClientConfig
- func PrivateKey(username, path string) (*ssh.ClientConfig, error)
- func PrivateKeyPassphrase(username, passphrase, path string) (*ssh.ClientConfig, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewSession ¶
NewSession connects to the remote SSH server, returns error if it couldn't establish a session to the SSH server
func PasswordKey ¶
func PasswordKey(username, password string) *ssh.ClientConfig
PasswordKey returns the ssh.ClientConfig based on specified username and password.
func PrivateKey ¶
func PrivateKey(username, path string) (*ssh.ClientConfig, error)
PrivateKey loads a public key from "path" and returns a SSH ClientConfig to authenticate with the server.
func PrivateKeyPassphrase ¶
func PrivateKeyPassphrase(username, passphrase, path string) (*ssh.ClientConfig, error)
PrivateKeyPassphrase returns the ssh.ClientConfig based on specified username, passphrase and path.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.