Enum openssh::KnownHosts
source · pub enum KnownHosts {
Strict,
Add,
Accept,
}
Expand description
Specifies how the host’s key fingerprint should be handled.
Variants§
Strict
The host’s fingerprint must match what is in the known hosts file.
If the host is not in the known hosts file, the connection is rejected.
This corresponds to ssh -o StrictHostKeyChecking=yes
.
Add
Strict, but if the host is not already in the known hosts file, it will be added.
This corresponds to ssh -o StrictHostKeyChecking=accept-new
.
Accept
Accept whatever key the server provides and add it to the known hosts file.
This corresponds to ssh -o StrictHostKeyChecking=no
.
Trait Implementations§
source§impl Clone for KnownHosts
impl Clone for KnownHosts
source§fn clone(&self) -> KnownHosts
fn clone(&self) -> KnownHosts
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for KnownHosts
impl RefUnwindSafe for KnownHosts
impl Send for KnownHosts
impl Sync for KnownHosts
impl Unpin for KnownHosts
impl UnwindSafe for KnownHosts
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)