Struct HostParams

Source
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

Source

pub fn new(default_algorithms: &DefaultAlgorithms) -> Self

Create a new HostParams object with the DefaultAlgorithms

Source

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

Source§

fn clone(&self) -> HostParams

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for HostParams

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl PartialEq for HostParams

Source§

fn eq(&self, other: &HostParams) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Eq for HostParams

Source§

impl StructuralPartialEq for HostParams

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.