LogRaker has released a public fork of the `swift-nio-ssh` library to provide support for RSA key pairs, addressing a compatibility gap for users managing legacy infrastructure. While the upstream library intentionally excludes RSA to prioritize modern defaults like Ed25519, many production environments—including Amazon EC2 instances providing PKCS#1 RSA keys—remain dependent on these older formats.

A stylized illustration featuring a stack of servers, a colorful log file, and a pulse dial.
LogRaker's branding illustrates the intersection of server infrastructure and log monitoring.lograker.app

This image represents the LogRaker platform which is releasing the fork to support legacy infrastructure.

The Necessity of a Fork

The upstream `swift-nio-ssh` library is designed to support modern cryptographic primitives only, making Ed25519 the preferred default for new deployments. However, this design choice creates a barrier for users whose infrastructure relies on RSA keys, such as older Amazon EC2 instances that only added Ed25519 support in 2021.

Because `NIOSSHPrivateKey` stores its key in an internal enum and uses private initializers, there is no public protocol or extension point to add RSA support from the outside. LogRaker was forced to fork the library, modifying eight files to include the necessary `_RSA.Signing` primitives from `swift-crypto`.

“A log viewer that cannot use the key sitting in ~/.ssh/ is not useful.”

— Adding RSA Support to swift-nio-ssh

Handling RSA Algorithm Discrepancies

A significant technical hurdle in the fork involves the discrepancy between RSA key tags and signature algorithm names. For Ed25519 and ECDSA, these two strings are identical, but for RSA, the key blob is tagged as `ssh-rsa` while the algorithm name must specify the signature type, such as `rsa-sha2-512`.

The fork introduces a `signatureAlgorithmName` property to ensure these values are synchronized. If the name in the wire message diverges from the name in the signed buffer, the server will reject the connection as a failed key match, even if the RSA signature itself is mathematically valid.

Negotiation Limits and Maintenance Costs

The fork currently offers `rsa-sha2-512` without negotiation because `swift-nio-ssh` does not yet parse `SSH_MSG_EXT_INFO`. This prevents the client from seeing the server's `server-sig-algs` list, meaning the client cannot dynamically choose the best available algorithm.

By choosing a vendored fork, LogRaker accepts the 'cost of vendoring': the responsibility for security updates shifts entirely to the maintainer. Since local SwiftPM packages do not report new versions, the team must manually monitor the upstream project's security advisories to ensure the fork remains secure.