Enum libssh_rs::SshOption [−][src]
pub enum SshOption {
Hostname(String),
Port(u16),
LogLevel(LogLevel),
Socket(RawSocket),
BindAddress(String),
User(Option<String>),
SshDir(Option<String>),
KnownHosts(Option<String>),
ProxyCommand(Option<String>),
AddIdentity(String),
Timeout(Duration),
}Expand description
Allows configuring different aspects of a Session.
You always need to set at least SshOption::Hostname.
Variants
Hostname(String)
Tuple Fields
0: StringThe hostname or ip address to connect to
Port(u16)
Tuple Fields
0: u16The port to connect to
LogLevel(LogLevel)
Tuple Fields
0: LogLevelSocket(RawSocket)
Tuple Fields
0: RawSocketThe pre-opened socket. You don’t typically need to provide this. Don’t forget to set the hostname as the hostname is used as a key in the known_host mechanism.
BindAddress(String)
Tuple Fields
0: StringThe address to bind the client to
User(Option<String>)
The username for authentication If the value is None, the username is set to the default username.
SshDir(Option<String>)
Set the ssh directory If the value is None, the directory is set to the default ssh directory. The ssh directory is used for files like known_hosts and identity (private and public key). It may include “%s” which will be replaced by the user home directory.
KnownHosts(Option<String>)
Set the known hosts file name If the value is None, the directory is set to the default known hosts file, normally ~/.ssh/known_hosts. The known hosts file is used to certify remote hosts are genuine. It may include “%d” which will be replaced by the user home directory.
ProxyCommand(Option<String>)
Configures the ProxyCommand ssh option, which is used to establish an alternative transport to using a direct TCP connection
AddIdentity(String)
Tuple Fields
0: StringAdd a new identity file (const char *, format string) to the identity list. By default identity, id_dsa and id_rsa are checked. The identity used to authenticate with public key will be prepended to the list. It may include “%s” which will be replaced by the user home directory.
Timeout(Duration)
Tuple Fields
0: DurationSet a timeout for the connection
