pub enum Error {
Show 41 variants
CouldNotReadKey,
KexInit,
UnknownAlgo,
NoCommonAlgo {
kind: AlgorithmKind,
ours: Vec<String>,
theirs: Vec<String>,
},
Version,
Kex,
PacketAuth,
Inconsistent,
NotAuthenticated,
UnsupportedAuthMethod,
IndexOutOfBounds,
UnknownKey,
WrongServerSig,
PacketSize(usize),
WrongChannel,
ChannelOpenFailure(ChannelOpenFailure),
Disconnect,
NoHomeDir,
KeyChanged {
line: usize,
},
HUP,
ConnectionTimeout,
KeepaliveTimeout,
InactivityTimeout,
NoAuthMethod,
SendError,
Pending,
DecryptionError,
RequestDenied,
Keys(Error),
IO(Error),
Utf8(Utf8Error),
Compress(CompressError),
Decompress(DecompressError),
Join(JoinError),
Elapsed(Elapsed),
StrictKeyExchangeViolation {
message_type: u8,
sequence_number: usize,
},
Signature(Error),
SshKey(Error),
SshEncoding(Error),
InvalidConfig(String),
RecvError,
}Variants§
CouldNotReadKey
The key file could not be parsed.
KexInit
Unspecified problem with the beginning of key exchange.
UnknownAlgo
Unknown algorithm name.
NoCommonAlgo
No common algorithm found during key exchange.
Version
Invalid SSH version string.
Kex
Error during key exchange.
PacketAuth
Invalid packet authentication code.
Inconsistent
The protocol is in an inconsistent state.
NotAuthenticated
The client is not yet authenticated.
UnsupportedAuthMethod
The client has presented an unsupported authentication method.
IndexOutOfBounds
Index out of bounds.
UnknownKey
Unknown server key.
WrongServerSig
The server provided a wrong signature.
PacketSize(usize)
Excessive packet size.
WrongChannel
Message received/sent on unopened channel.
ChannelOpenFailure(ChannelOpenFailure)
Server refused to open a channel.
Disconnect
Disconnected
NoHomeDir
No home directory found when trying to learn new host key.
KeyChanged
Remote key changed, this could mean a man-in-the-middle attack is being performed on the connection.
HUP
Connection closed by the remote side.
ConnectionTimeout
Connection timeout.
KeepaliveTimeout
Keepalive timeout.
InactivityTimeout
Inactivity timeout.
NoAuthMethod
Missing authentication method.
SendError
Pending
DecryptionError
RequestDenied
Keys(Error)
IO(Error)
Utf8(Utf8Error)
Compress(CompressError)
Decompress(DecompressError)
Join(JoinError)
Elapsed(Elapsed)
StrictKeyExchangeViolation
Signature(Error)
SshKey(Error)
SshEncoding(Error)
InvalidConfig(String)
RecvError
This error occurs when the channel is closed and there are no remaining messages in the channel buffer. This is common in SSH-Agent, for example when the Agent client directly rejects an authorization request.