Skip to main content

ssh_key_needs_passphrase

Function ssh_key_needs_passphrase 

Source
pub fn ssh_key_needs_passphrase(
    path: impl AsRef<Path>,
) -> Result<bool, TunnelError>
Expand description

Probe whether an SSH private key file requires a passphrase.

Returns Ok(true) if the key is encrypted, Ok(false) if it loads without a passphrase, and Err(TunnelError::Key(...)) for I/O or parse errors.