micro509/ssh
Read and write OpenSSH public-key lines, unencrypted openssh-key-v1 private keys, and SHA256: fingerprints.
Start with importSshPublicKey or importOpenSshPrivateKey.
Functions
exportOpenSshPrivateKey— Export a private key as an unencryptedopenssh-key-v1PEM file.exportSshPublicKey— Export a public key as an OpenSSH public-key line.importOpenSshPrivateKey— Import an unencrypted single-keyopenssh-key-v1private key file.importOpenSshPrivateKeyOrThrow— Throwing variant ofimportOpenSshPrivateKey.importSshPublicKey— Import an OpenSSH public-key line (<type> <base64> [comment]).importSshPublicKeyOrThrow— Throwing variant ofimportSshPublicKey.sshFingerprintSha256— TheSHA256:fingerprintssh-keygen -l -E sha256prints for a key.
Types
ImportedOpenSshPrivateKey— Key pair read from anopenssh-key-v1private-key file.ImportedSshPublicKey— Public key read from an OpenSSH public-key line.SshErrorCode— Machine-readable failure reason of the SSH key import functions.SshExportErrorCode— Machine-readable failure reason of the SSH key export functions.SshExportOptions— Options ofexportSshPublicKeyandexportOpenSshPrivateKey.SshFailure— Structured failure payload of the SSH key import functions.SshImportOptions— Policy options of the SSH key import functions.SshKeyAlgorithm— Algorithm family of an SSH key, discriminated bykind.SshKeyType— SSH public-key type names (RFC 4253 §6.6, RFC 5656 §6.2, RFC 8709 §4) this module reads and writes.SshResult— Success-or-failure result of the SSH key import functions.