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: SshIdThe server ID string sent at the beginning of the protocol.
methods: MethodSetAuthentication methods proposed to the client.
The authentication banner, usually a warning message shown 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<KeyPair>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.
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.