pub struct HostParams {Show 23 fields
pub bind_address: Option<String>,
pub bind_interface: Option<String>,
pub ca_signature_algorithms: Algorithms,
pub certificate_file: Option<PathBuf>,
pub ciphers: Algorithms,
pub compression: Option<bool>,
pub connection_attempts: Option<usize>,
pub connect_timeout: Option<Duration>,
pub host_key_algorithms: Algorithms,
pub host_name: Option<String>,
pub identity_file: Option<Vec<PathBuf>>,
pub ignore_unknown: Option<Vec<String>>,
pub kex_algorithms: Algorithms,
pub mac: Algorithms,
pub port: Option<u16>,
pub pubkey_accepted_algorithms: Algorithms,
pub pubkey_authentication: Option<bool>,
pub remote_forward: Option<u16>,
pub server_alive_interval: Option<Duration>,
pub tcp_keep_alive: Option<bool>,
pub user: Option<String>,
pub ignored_fields: HashMap<String, Vec<String>>,
pub unsupported_fields: HashMap<String, Vec<String>>,
}
Expand description
Describes the ssh configuration. Configuration is describes in this document: http://man.openbsd.org/OpenBSD-current/man5/ssh_config.5 Only arguments supported by libssh2 are implemented
Fields§
§bind_address: Option<String>
Specifies to use the specified address on the local machine as the source address of the connection
bind_interface: Option<String>
Use the specified address on the local machine as the source address of the connection
ca_signature_algorithms: Algorithms
Specifies which algorithms are allowed for signing of certificates by certificate authorities
certificate_file: Option<PathBuf>
Specifies a file from which the user’s certificate is read
ciphers: Algorithms
Specifies the ciphers allowed for protocol version 2 in order of preference
compression: Option<bool>
Specifies whether to use compression
connection_attempts: Option<usize>
Specifies the number of attempts to make before exiting
connect_timeout: Option<Duration>
Specifies the timeout used when connecting to the SSH server
host_key_algorithms: Algorithms
Specifies the host key signature algorithms that the client wants to use in order of preference
host_name: Option<String>
Specifies the real host name to log into
identity_file: Option<Vec<PathBuf>>
Specifies the path of the identity file to be used when authenticating. More than one file can be specified. If more than one file is specified, they will be read in order
ignore_unknown: Option<Vec<String>>
Specifies a pattern-list of unknown options to be ignored if they are encountered in configuration parsing
kex_algorithms: Algorithms
Specifies the available KEX (Key Exchange) algorithms
mac: Algorithms
Specifies the MAC (message authentication code) algorithms in order of preference
port: Option<u16>
Specifies the port number to connect on the remote host.
pubkey_accepted_algorithms: Algorithms
Specifies the signature algorithms that will be used for public key authentication
pubkey_authentication: Option<bool>
Specifies whether to try public key authentication using SSH keys
remote_forward: Option<u16>
Specifies that a TCP port on the remote machine be forwarded over the secure channel
server_alive_interval: Option<Duration>
Sets a timeout interval in seconds after which if no data has been received from the server, keep alive will be sent
tcp_keep_alive: Option<bool>
Specifies whether to send TCP keepalives to the other side
user: Option<String>
Specifies the user to log in as.
ignored_fields: HashMap<String, Vec<String>>
fields that the parser wasn’t able to parse
unsupported_fields: HashMap<String, Vec<String>>
fields that the parser was able to parse but ignored
Implementations§
Source§impl HostParams
impl HostParams
Sourcepub fn new(default_algorithms: &DefaultAlgorithms) -> Self
pub fn new(default_algorithms: &DefaultAlgorithms) -> Self
Create a new HostParams
object with the DefaultAlgorithms
Sourcepub fn overwrite_if_none(&mut self, b: &Self)
pub fn overwrite_if_none(&mut self, b: &Self)
Given a HostParams
object b
, it will overwrite all the params from self
only if they are None
Trait Implementations§
Source§impl Clone for HostParams
impl Clone for HostParams
Source§fn clone(&self) -> HostParams
fn clone(&self) -> HostParams
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more