Registry / crypto / ssh-key

ssh-key

JSON →
library0.6.7rscratesunverified

Pure Rust implementation of SSH key file format decoders/encoders, including RFC4251/RFC4253, OpenSSH formats, sshsig signatures, and certificates.

# Cargo.toml [dependencies] ssh-key = "0.6.7"
INSTALL
IMPORT
SIG · SSH-KEY
S
ssh-key
cryptorustv0.6.7
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

PublicKey
use ssh_key::PublicKey;

Parse an SSH public key from an OpenSSH file.

use ssh_key::PublicKey; fn main() -> Result<(), Box<dyn std::error::Error>> { let key = PublicKey::from_openssh_file("id_rsa.pub")?; println!("Key algorithm: {}", key.algorithm()); Ok(()) }
Debug
Known issues
gotchaRequires the `pem` feature for PEM-encoded keys.
fix
Add `features = ["pem"]` to your Cargo.toml dependency.
affects: >=0.6.0
Upgrade
Version history
0.6.7latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
21 hits · last 30 days
node
18
Resources
ssh-key — cargo add ssh-key · libregistry