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 ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client for SSH connection.
func NewClient ¶
func NewClient(cfg *ConfigSection) (cl *Client, err error)
NewClient create a new SSH connection using predefined configuration.
func (*Client) Get ¶
Get copy file from remote into local storage.
The local file should be use the absolute path, or relative to the file in ConfigSection's workingDir.
type Config ¶ added in v0.15.0
type Config struct {
// contains filtered or unexported fields
}
Config contains mapping of host's patterns and its options from SSH configuration file.
func (*Config) Get ¶ added in v0.15.0
func (cfg *Config) Get(s string) (section *ConfigSection)
Get the Host or Match configuration that match with the pattern "s".
type ConfigSection ¶ added in v0.15.0
type ConfigSection struct { AddKeysToAgent string AddressFamily string BindAddress string BindInterface string CanonicalDomains []string CanonicalizeHostname string CanonicalizeMaxDots int CanonicalizePermittedCNAMEs *PermittedCNAMEs CASignatureAlgorithms []string CertificateFile []string ConnectionAttempts int ConnectTimeout int // Environments contains system environment variables that will be // passed to Execute(). // The key and value is derived from "SendEnv" and "SetEnv". Environments map[string]string Hostname string IdentityFile []string Port int User string XAuthLocation string IsBatchMode bool IsCanonicalizeFallbackLocal bool IsChallengeResponseAuthentication bool IsCheckHostIP bool IsClearAllForwardings bool UseCompression bool UseVisualHostKey bool // contains filtered or unexported fields }
ConfigSection is the type that represent SSH client Host and Match section in configuration.
type PermittedCNAMEs ¶ added in v0.15.0
type PermittedCNAMEs struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.