Documentation ¶
Overview ¶
Package ssh2 provides functions for interacting with a SSH server.
Index ¶
Constants ¶
View Source
const ( DefaultPort = 22 DefaultTimeout = 5 * time.Second SchemeSSH = "ssh" SchemeSFTP = "sftp" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
func Dial ¶
func Dial(uri string, options ...ClientOption) (*Client, error)
Dial returns a Client for the SSH server at a given SSH or SFTP URI. The ClientOption options are processed after the authority from the URI.
Dial returns an error if the address cannot be dialed, the userinfo cannot be parsed, the user and password are invalid, or the file cannot be retrieved.
type ClientConfig ¶
type ClientConfig struct {
ssh.ClientConfig
}
type ClientOption ¶
type ClientOption func(config *ClientConfig) error
type PrivateKey ¶
func LoadPrivateKey ¶
func LoadPrivateKey(path string) (PrivateKey, error)
Click to show internal directories.
Click to hide internal directories.