pub struct Config {Show 16 fields
pub server_id: SshId,
pub methods: MethodSet,
pub auth_rejection_time: Duration,
pub auth_rejection_time_initial: Option<Duration>,
pub keys: Vec<PrivateKey>,
pub limits: Limits,
pub window_size: u32,
pub maximum_packet_size: u32,
pub channel_buffer_size: usize,
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,
pub nodelay: bool,
}Expand description
Configuration of a server.
Fields§
§server_id: SshIdThe server ID string sent at the beginning of the protocol.
methods: MethodSetAuthentication methods proposed to the client.
auth_rejection_time: DurationAuthentication 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<PrivateKey>The server’s keys. The first key pair in the client’s preference order will be chosen.
limits: LimitsThe bytes and time limits before key re-exchange.
window_size: u32The initial size of a channel (used for flow control).
maximum_packet_size: u32The maximal size of a single packet.
channel_buffer_size: usizeBuffer size for each channel (a number of unprocessed messages to store before propagating backpressure to the TCP stream)
event_buffer_size: usizeInternal event buffer size
preferred: PreferredLists of preferred algorithms.
max_auth_attempts: usizeMaximal 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: usizeIf this many keepalives have been sent without reply, close the connection.
nodelay: boolIf active, invoke set_nodelay(true) on client sockets; disabled by default (i.e. Nagle’s algorithm is active).
Trait Implementations§
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> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> Declassify for T
impl<T> Declassify for T
type Declassified = T
fn declassify(self) -> T
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more