pub struct ConnectionConfig {
pub host: String,
pub port: u16,
pub username: String,
pub password: SecretString,
pub key_path: Option<String>,
pub key_passphrase: Option<SecretString>,
pub timeout_ms: u64,
pub known_hosts_path: Option<PathBuf>,
pub replace_host_key: bool,
}Expand description
SSH connection configuration.
Built from a crate::vps::model::VpsRecord at the time
of the call. Auth: private key (preferred) and/or password.
Fields§
§host: StringHostname ou IP do servidor SSH.
port: u16SSH server TCP port (default 22).
username: StringSSH username.
password: SecretStringSSH password (SecretString for automatic zeroize); may be empty for key-only.
key_path: Option<String>OpenSSH private key path (optional).
key_passphrase: Option<SecretString>Key passphrase (optional).
timeout_ms: u64Total timeout for connect + handshake + authentication + exec, in ms.
known_hosts_path: Option<PathBuf>Path to known_hosts file (TOFU). None = always-trust (tests only).
replace_host_key: boolSe true, permite substituir fingerprint divergente.
Implementations§
Source§impl ConnectionConfig
impl ConnectionConfig
Sourcepub fn validate(&self) -> SshCliResult<()>
pub fn validate(&self) -> SshCliResult<()>
Validates basic configuration fields.
Trait Implementations§
Source§impl Clone for ConnectionConfig
impl Clone for ConnectionConfig
Source§fn clone(&self) -> ConnectionConfig
fn clone(&self) -> ConnectionConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 ConnectionConfig
impl RefUnwindSafe for ConnectionConfig
impl Send for ConnectionConfig
impl Sync for ConnectionConfig
impl Unpin for ConnectionConfig
impl UnsafeUnpin for ConnectionConfig
impl UnwindSafe for ConnectionConfig
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