Repository navigation
2024.2.0.4-beta
Pre-release
Pre-release
⚠️ Breaking changes
- Errors while talking to the agent now throw
SshAgentException/SshAgentFailureExceptioninstead of bareSystem.Exception; adding an unsupported key type throwsNotSupportedExceptionup front. - RSA identities are offered as
rsa-sha2-512/rsa-sha2-256(RFC 8332). The legacy SHA-1ssh-rsais only offered with the newIncludeLegacySshRsaopt-in — this fixes "Too many authentication failures" with multiple RSA keys (#13) and works with OpenSSH 8.8+, which rejects ssh-rsa signatures. RequestIdentities()skips key types this library cannot use (e.g.sk-*FIDO keys) instead of failing the whole listing.PageantSocketStreamis now internal.- The SSH.NET dependency declares the range
[2024.2.0, 2026.0); compatibility with SSH.NET 2025.1.0 is verified by compiling against it and running the full test suite with it.
New features
- OpenSSH certificates: certificate identities held by the agent (
*-cert-v01@openssh.com) authenticate against servers that trust the CA, andAddIdentityadds key+certificate pairs (PrivateKeyFilewith a certificate). - Key constraints:
AddIdentity(keyFile, lifetime, confirm)likessh-add -t/-c. - Lock/Unlock:
agent.Lock(passphrase)/agent.Unlock(passphrase)likessh-add -x/-X. - Async API:
RequestIdentitiesAsync,AddIdentityAsync,RemoveIdentityAsync,RemoveIdentitiesAsync,RemoveAllIdentitiesAsync, all taking aCancellationToken. - net8.0 target in addition to net48/netstandard2.0/netstandard2.1.
Fixes
- Windows named pipes: reads and writes now honor the configured timeout — a stalled agent no longer blocks the caller forever — and the full
\\.\pipe\openssh-ssh-agentpath is accepted. - Key comments are encoded and decoded as UTF-8 on every framework.
- Correct
Stream.Disposepattern in the transport streams; the connection is reliably closed. - Clear
EndOfStreamExceptionwhen the agent closes the connection mid-message.
Packaging
- README and XML documentation ship with the package; missing docs on the public API are a build error.
- SourceLink with deterministic CI builds and snupkg symbol packages — consumers can step into the library.
- Publishing switched to NuGet trusted publishing (no stored API key).
Tests
- Protocol-level golden-byte tests against an in-process fake agent run on every platform without prerequisites.
- Real-world tests cover OpenSSH ssh-agent and PuTTY Pageant against a real sshd, including certificate authentication against a CA-trusting server (
TrustedUserCAKeys).