pub struct SshKeyInfo {Show 13 fields
pub name: String,
pub display_path: String,
pub key_type: String,
pub bits: String,
pub fingerprint: String,
pub comment: String,
pub linked_hosts: Vec<String>,
pub bishop_art: String,
pub strength_score: u8,
pub encrypted: bool,
pub agent_loaded: bool,
pub is_certificate: bool,
pub mtime_ts: Option<u64>,
}Expand description
Information about an SSH key found on disk.
Fields§
§name: StringDisplay name (filename without path, e.g. “id_ed25519”)
display_path: StringDisplay path with tilde (e.g. “~/.ssh/id_ed25519”)
key_type: StringKey type (e.g. “ED25519”, “RSA”, “sk-ED25519”)
bits: StringKey bits (e.g. “256”, “4096”)
fingerprint: StringSHA256 fingerprint
comment: StringComment from the public key
linked_hosts: Vec<String>Host aliases that reference this key via IdentityFile
bishop_art: StringDrunken Bishop visual fingerprint from ssh-keygen -lv. 11 lines
(top border + 9 content + bottom border), joined with \n. Empty
when ssh-keygen returned no art block.
strength_score: u8Strength score 0..=100. Composed of algorithm strength, key size and
on-disk encryption. Hardware-bound sk-* keys score highest;
deprecated DSA and short RSA score lowest.
encrypted: boolPrivate key on disk is passphrase-encrypted. Detected via
ssh-keygen -y -P "" -f <key> exit status. False when the private
key is missing or unreadable.
agent_loaded: boolPublic key fingerprint matches an entry returned by ssh-add -l.
is_certificate: boolFile is an OpenSSH user certificate. Detected via -cert.pub
filename suffix or a -cert substring in the ssh-keygen-reported
key type (see detect_certificate).
mtime_ts: Option<u64>File mtime of the private key (or pubkey when private is missing),
expressed as seconds since UNIX epoch. None when the file system
cannot report a timestamp. Powers the Modified field on the
Keys tab hero panel; mtime is the most portable proxy because
birthtime is not exposed by every supported filesystem.
Implementations§
Source§impl SshKeyInfo
impl SshKeyInfo
Sourcepub fn type_display(&self) -> String
pub fn type_display(&self) -> String
Format type with bits (e.g. “ED25519” or “RSA 4096”).
Sourcepub fn bishop_lines(&self) -> Vec<&str>
pub fn bishop_lines(&self) -> Vec<&str>
Drunken Bishop art split into rendering-ready lines. Empty Vec when
bishop_art is empty (e.g. when ssh-keygen failed at discovery).
Trait Implementations§
Source§impl Clone for SshKeyInfo
impl Clone for SshKeyInfo
Source§fn clone(&self) -> SshKeyInfo
fn clone(&self) -> SshKeyInfo
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for SshKeyInfo
impl RefUnwindSafe for SshKeyInfo
impl Send for SshKeyInfo
impl Sync for SshKeyInfo
impl Unpin for SshKeyInfo
impl UnsafeUnpin for SshKeyInfo
impl UnwindSafe for SshKeyInfo
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more