pub enum TransportError {
Connect(String),
Auth(String),
Channel(String),
ChannelClosed(String),
Io(Error),
Ssh(String),
HostKeyMismatch {
host: String,
expected: String,
actual: String,
},
HostKeyNotInKnownHosts {
host: String,
port: u16,
path: String,
},
HostKeyRevoked {
host: String,
},
}Expand description
Transport layer errors (SSH connection, authentication, I/O).
Variants§
Connect(String)
Failed to establish TCP/SSH connection.
Auth(String)
SSH authentication rejected.
Channel(String)
SSH channel or subsystem error.
ChannelClosed(String)
SSH channel was closed by the remote side (device reboot, SSH timeout, network interruption).
This is the most common transport failure during an active session.
Callers should reconnect().
Io(Error)
General I/O error on the transport.
Ssh(String)
SSH library error.
HostKeyMismatch
Server presented a host key whose fingerprint does not match the one recorded in the known_hosts file for this host. Possible MITM attack or the device’s host key was rotated — investigate before reconnecting.
HostKeyNotInKnownHosts
No entry for this host exists in the known_hosts file. Fail closed —
pre-populate the file with ssh-keyscan before connecting.
HostKeyRevoked
The known_hosts file contains an @revoked entry for the host key
presented by the server. Fail closed.
Trait Implementations§
Source§impl Debug for TransportError
impl Debug for TransportError
Source§impl Display for TransportError
impl Display for TransportError
Source§impl Error for TransportError
impl Error for TransportError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()