pub struct SshKey {
pub path: PathBuf,
pub key_type: KeyType,
pub fingerprint: Option<Fingerprint>,
pub comment: Option<String>,
pub encrypted: bool,
pub source: KeySource,
pub permissions: Option<Permissions>,
pub has_public_pair: bool,
pub has_certificate: bool,
pub last_modified: Option<u64>,
pub used_by_hosts: Vec<String>,
pub key_format: Option<KeyFormat>,
}Expand description
A discovered SSH key with metadata.
Fields§
§path: PathBufPath to the private key file.
key_type: KeyTypeDetected key algorithm.
fingerprint: Option<Fingerprint>SHA-256 fingerprint, if computable.
comment: Option<String>Key comment.
encrypted: boolWhether the private key is passphrase-protected.
source: KeySourceWhere the key was found.
permissions: Option<Permissions>File permissions, if readable.
has_public_pair: boolWhether a matching .pub file exists.
has_certificate: boolWhether a matching -cert.pub file exists.
last_modified: Option<u64>File modification time (seconds since Unix epoch), if available.
used_by_hosts: Vec<String>Host aliases in ~/.ssh/config that reference this key via IdentityFile.
key_format: Option<KeyFormat>Detected key format (PEM vs OpenSSH), if known.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for SshKey
impl<'de> Deserialize<'de> for SshKey
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<SshKey, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<SshKey, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for SshKey
impl Serialize for SshKey
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
impl Freeze for SshKey
impl RefUnwindSafe for SshKey
impl Send for SshKey
impl Sync for SshKey
impl Unpin for SshKey
impl UnsafeUnpin for SshKey
impl UnwindSafe for SshKey
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