Documentation ¶
Overview ¶
Package ssh contains SSH related models and methods.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConnectCommand ¶
ConnectCommand - builds ssh command to connect to a remote host.
func LoadConfigCommand ¶
func LoadConfigCommand(option OptionReadConfig) string
LoadConfigCommand - builds ssh command to load config from ssh_config file.
Types ¶
type Config ¶
type Config struct { // Values which should be extracted from 'ssh -G <hostname>' command: // 1. 'identityfile' // 2. 'user' // 3. 'port' IdentityFile string User string Port string }
Config struct contains values loaded from ~/.ssh_config file.
func StubConfig ¶
func StubConfig() *Config
StubConfig - returns a stub SSH config. It is used on application startup when build application state and no hosts yet available. Consider to run real ssh process to request a config. See 'message.RunProcessLoadSSHConfig'.
type OptionAddress ¶
type OptionAddress struct{ Value string }
OptionAddress - is a remote host address. Example: somehost.com.
type OptionLoginName ¶
type OptionLoginName struct{ Value string }
OptionLoginName - is a login name which is used when connecting to a remote host. Ex: [email protected].
type OptionPrivateKey ¶
type OptionPrivateKey struct{ Value string }
OptionPrivateKey - ssh private key path in file system.
type OptionReadConfig ¶
type OptionReadConfig struct{ Value string }
OptionReadConfig - is used to read config file from ssh_config. Cannot be combined with other options.
type OptionRemotePort ¶
type OptionRemotePort struct{ Value string }
OptionRemotePort - Remote port to connect to.