Struct ssh2_config::HostParams

source ·
pub struct HostParams {
Show 21 fields pub bind_address: Option<String>, pub bind_interface: Option<String>, pub ca_signature_algorithms: Option<Vec<String>>, pub certificate_file: Option<PathBuf>, pub ciphers: Option<Vec<String>>, pub compression: Option<bool>, pub connection_attempts: Option<usize>, pub connect_timeout: Option<Duration>, pub host_key_algorithms: Option<Vec<String>>, pub host_name: Option<String>, pub identity_file: Option<Vec<PathBuf>>, pub ignore_unknown: Option<Vec<String>>, pub kex_algorithms: Option<Vec<String>>, pub mac: Option<Vec<String>>, pub port: Option<u16>, pub pubkey_accepted_algorithms: Option<Vec<String>>, 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>,
}
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: Option<Vec<String>>

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: Option<Vec<String>>

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: Option<Vec<String>>

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: Option<Vec<String>>

Specifies the available KEX (Key Exchange) algorithms

§mac: Option<Vec<String>>

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: Option<Vec<String>>

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.

Implementations§

source§

impl HostParams

source

pub fn merge(&mut self, b: &Self)

Override current params with params of b

Trait Implementations§

source§

impl Clone for HostParams

source§

fn clone(&self) -> HostParams

Returns a copy 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 Default for HostParams

source§

fn default() -> HostParams

Returns the “default value” for a type. Read more
source§

impl PartialEq<HostParams> for HostParams

source§

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

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

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

This method 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 StructuralEq for HostParams

source§

impl StructuralPartialEq for HostParams

Auto Trait Implementations§

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

const: unstable · source§

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

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

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

const: unstable · 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 Twhere T: Clone,

§

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 Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

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

Performs the conversion.
source§

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

§

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

The type returned in the event of a conversion error.
const: unstable · source§

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

Performs the conversion.