Skip to content

2024.2.0.4-beta

Pre-release
Pre-release

Choose a tag to compare

@darinkes darinkes released this 14 Jul 08:45
· 31 commits to main since this release

⚠️ Breaking changes

  • Errors while talking to the agent now throw SshAgentException / SshAgentFailureException instead of bare System.Exception; adding an unsupported key type throws NotSupportedException up front.
  • RSA identities are offered as rsa-sha2-512/rsa-sha2-256 (RFC 8332). The legacy SHA-1 ssh-rsa is only offered with the new IncludeLegacySshRsa opt-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.
  • PageantSocketStream is 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, and AddIdentity adds key+certificate pairs (PrivateKeyFile with a certificate).
  • Key constraints: AddIdentity(keyFile, lifetime, confirm) like ssh-add -t/-c.
  • Lock/Unlock: agent.Lock(passphrase) / agent.Unlock(passphrase) like ssh-add -x/-X.
  • Async API: RequestIdentitiesAsync, AddIdentityAsync, RemoveIdentityAsync, RemoveIdentitiesAsync, RemoveAllIdentitiesAsync, all taking a CancellationToken.
  • 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-agent path is accepted.
  • Key comments are encoded and decoded as UTF-8 on every framework.
  • Correct Stream.Dispose pattern in the transport streams; the connection is reliably closed.
  • Clear EndOfStreamException when 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).