Repository navigation
2024.2.0.4
SSH.NET extension to generate and export authentication keys in OpenSSH and PuTTY v2/v3 format.
Features
- OpenSSH certificate signing —
SshCertificateBuildermints*-cert-v01@openssh.comuser/host certificates (principals, validity window, critical options, extensions) signed with a CA key via.SignWith(caKey). Pairs with SshNet.Agent, which now presents certificate identities. - SSH signatures (SSHSIG) — sign data or files with
keyFile.Signature(data)/keyFile.SignatureFile(path)and verify withSshSignature.Verify(...)/SshSignature.VerifyFile(...), interoperable withssh-keygen -Y sign/-Y verify(namespace defaults tofile). - .NET key interop — import an existing
RSA/ECDsa(or PEM / PKCS#8) key withSshKey.FromKey(...)and export it to OpenSSH or PuTTY format.
Improvements
- Dropped the vendored Chaos.NaCl copy in favor of SSH.NET's own
ED25519Key— one less bundled crypto implementation. SshKey.Generateleaves the caller's stream open instead of disposing it.RandomNumberGeneratorused for the OpenSSH check-int.
Fixes / Hardening
- SSH string fields are encoded as UTF-8 instead of ASCII — ASCII silently mangled non-ASCII text. Follows the 2024.2.0.3 passphrase fix.
- Non-NIST curves are rejected in
SshKey.FromKeyinstead of producing an unusable key. - Nonce and validity window are validated in
SshCertificateBuilder.
Testing / CI
- Certificate, signature and .NET-key-interop tests, including round-trips through the real
ssh-keygen. - net48 curve-rejection assertion covering the case where CNG hides the curve OID.
NuGet: https://www.nuget.org/packages/SshNet.Keygen/2024.2.0.4
Full changelog: 2024.2.0.3...2024.2.0.4