pub struct SshOptions {
pub connect_timeout: Duration,
pub command_timeout: Duration,
pub server_alive_interval: Option<Duration>,
pub control_persist_idle: Option<Duration>,
pub control_master: bool,
pub known_hosts: KnownHostsPolicy,
}Expand description
SSH connection options.
Fields§
§connect_timeout: DurationConnection timeout.
command_timeout: DurationCommand execution timeout.
server_alive_interval: Option<Duration>Server keepalive interval (ssh -o ServerAliveInterval).
Defaults to None (OpenSSH default; keepalive disabled).
control_persist_idle: Option<Duration>How long the SSH ControlMaster should remain alive while idle.
Only applies when control_master is true (connection reuse). Some(n)
with n > 0 keeps the master warm for n idle seconds (ControlPersist=Ns).
Some(0s)/None, or ANY non-mux per-call session, closes the master
after the initial connection (ControlPersist=no). The OpenSSH crate
ControlPersist=yes (forever) default is never used — it leaked a
master process per per-call SSH. See control_persist_mode.
control_master: boolSSH control master mode for connection reuse.
known_hosts: KnownHostsPolicyKnown hosts policy.
Trait Implementations§
Source§impl Clone for SshOptions
impl Clone for SshOptions
Source§impl Debug for SshOptions
impl Debug for SshOptions
Auto Trait Implementations§
impl Freeze for SshOptions
impl RefUnwindSafe for SshOptions
impl Send for SshOptions
impl Sync for SshOptions
impl Unpin for SshOptions
impl UnsafeUnpin for SshOptions
impl UnwindSafe for SshOptions
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
Mutably borrows from an owned value. Read more