#[derive(Debug, thiserror::Error)]
pub enum SshError {
#[error("cannot connect to {host}: {reason}")]
Connect {
host: String,
reason: String,
},
#[error("host key verification failed for {host}: {reason}")]
HostKey {
host: String,
reason: String,
},
#[error("authentication failed for {user}@{host}: {reason}")]
Auth {
user: String,
host: String,
reason: String,
},
#[error(
"{file}: {directive} for host {host} is not supported by the built-in SSH client: use ssh_client = \"openssh\", or a host entry without it"
)]
Unsupported {
directive: String,
host: String,
file: String,
},
#[error("the connection was terminated")]
Disconnected,
#[error("the remote process was terminated")]
Terminated,
#[error("{0}")]
Other(String),
}