Skip to main content

RusshConfig

Struct RusshConfig 

Source
pub struct RusshConfig {
Show 15 fields pub server_id: SshId, pub methods: MethodSet, pub auth_banner: Option<&'static str>, pub auth_rejection_time: Duration, pub auth_rejection_time_initial: Option<Duration>, pub keys: Vec<KeyPair>, pub limits: Limits, pub window_size: u32, pub maximum_packet_size: u32, pub event_buffer_size: usize, pub preferred: Preferred, pub max_auth_attempts: usize, pub inactivity_timeout: Option<Duration>, pub keepalive_interval: Option<Duration>, pub keepalive_max: usize,
}
Expand description

Configuration of a server.

Fields§

§server_id: SshId

The server ID string sent at the beginning of the protocol.

§methods: MethodSet

Authentication methods proposed to the client.

§auth_banner: Option<&'static str>

The authentication banner, usually a warning message shown to the client.

§auth_rejection_time: Duration

Authentication rejections must happen in constant time for security reasons. Russh does not handle this by default.

§auth_rejection_time_initial: Option<Duration>

Authentication rejection time override for the initial “none” auth attempt. OpenSSH clients will send an initial “none” auth to probe for authentication methods.

§keys: Vec<KeyPair>

The server’s keys. The first key pair in the client’s preference order will be chosen.

§limits: Limits

The bytes and time limits before key re-exchange.

§window_size: u32

The initial size of a channel (used for flow control).

§maximum_packet_size: u32

The maximal size of a single packet.

§event_buffer_size: usize

Internal event buffer size

§preferred: Preferred

Lists of preferred algorithms.

§max_auth_attempts: usize

Maximal number of allowed authentication attempts.

§inactivity_timeout: Option<Duration>

Time after which the connection is garbage-collected.

§keepalive_interval: Option<Duration>

If nothing is received from the client for this amount of time, send a keepalive message.

§keepalive_max: usize

If this many keepalives have been sent without reply, close the connection.

Trait Implementations§

Source§

impl Debug for Config

Source§

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

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

impl Default for Config

Source§

fn default() -> Config

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

Auto Trait Implementations§

§

impl Freeze for Config

§

impl RefUnwindSafe for Config

§

impl Send for Config

§

impl Sync for Config

§

impl Unpin for Config

§

impl UnwindSafe for Config

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> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> Same for T

Source§

type Output = T

Should always be Self
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.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more