NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
crates.io, #3546 most downloaded on crates.io
A client and server SSH library.
Latest stable
0.65.1
Last release 16 days ago
03 Nov 2026
Ships fairly regularly
a new release about every 2 weeks
Nearly every release is documented
notes for 55 of the last 60 stable releases
4 versions withdrawn
withdrawn after publishing
5 years old
134 releases · first in 2022
Drag across the ruler to compare, or tap a release to open it.
4c7b27a: expose the "remaining methods" from auth failure responses (Eugene) #441
66f9416: Add an option to enable TCP_NODELAY (#435) (Patryk Wychowaniec)
diffie-hellman-group-exchange-sha256 KEX is now on the default kex list. To take advantage of dynamic DH groups, pre-generate some safe primes and implement dynamic group lookup in the server::Handler::lookup_dh_gex_group method - see this method's docs for more info.Your coding agent can read these notes before it upgrades. Set up the MCP server →
571dbe3: added support for PPK format private keys
russh now correctly builds on Rust 1.65
russh now correctly builds on Rust 1.65
Config::channel_buffer_size to control how many channel messages can be buffered before backpressure propagates over the network.authentication_banner method to server::Handler (#415) (Eric Rodrigues Pires) #415 - you can now send a dynamic SSH banner to clients.ssh-key lib, removed bundled workarounds - if you were relying on traits directly imported from ssh_key, you might need to import them from russh::keys::ssh_key instead.des dependency (#424) (Eric Seppanen) #424Nothing published for this version
cb5d3ba: fixed #418 - client - incorrect kex signature verification for RSA-SHA2
Nothing published for this version
This release fixes the regression in v0.48 which made it impossible to choose the hash algorithm when using RSA keys for authentication. Unfortunately
This release fixes the regression in v0.48 which made it impossible to choose the hash algorithm when using RSA keys for authentication. Unfortunately, the fix is a breaking API change, hence the version bump.
client::Handle::authenticate_publickey now takes a russh_keys::key::PrivateKeyWithHashAlg which you can construct from an Arc<russh_keys::PrivateKey> + Option<russh_keys::HashAlg>.
The latter lets you choose between SHA1, SHA256 and SHA512 for RSA keys, and must be None for all other key types.
Example:
let key_pair = load_secret_key(key_path, None)?;
let auth_res = session
.authenticate_publickey(
user,
PrivateKeyWithHashAlg::new(Arc::new(key_pair), Some(HashAlg::Sha512))?
)
.await?;
044da62: fixed handling of rsa-sha2-* key algorithms
rsa-sha2-* key algorithms…(#371) crates. This means there are some breaking changes, which are listed here:
russh v0.48 drops its own data parsing and key handling code in favor of the RustCrypto project's ssh-key (#368) and ssh-encoding (#371) crates. This means there are some breaking changes, which are listed here:
russh_keys::key::PublicKey is replaced with russh_keys::PublicKey (ssh_key::PublicKey)
russh_keys::key::KeyPair is replaced with russh_keys::PrivateKey (ssh_key::PrivateKey)
russh_keys::key::parse_public_key no longer takes a hash algorithm argument as RSA keys are no longer locked down to a specific algorithm internally. RSA key specific hash algorithms are only used in Preferred::key.
Key type constants in russh_keys::key and russh_keys::key::Name are removed - use the russh_keys::Algorithm enum instead. Config::preferred::key now also takes russh_keys::Algorithms instead of russh_key::key::Names.
russh::client::Handle::authenticate_future is renamed to russh::client::Handle::authenticate_publickey_with
new russh::Error enum variants:
Error:SignatureError:SshKeyError:SshEncodingnew russh_keys::Error enum variants:
Error::RsaError::Utf8russh::auth::Signer is now an async_trait
russh_keys::ec is removed
russh_keys::encoding is removed (use russh_keys::ssh_encoding)
russh_keys::signature is removed
russh_keys::protocol is removed
russh_keys::key::SignatureHash is replaced with russh_keys::HashAlg (ssh_key::HashAlg)
russh_keys::key::SignatureBytes is removed
russh_keys::key::RsaPrivate is removed (use russh_keys::ssh_key::private::RsaPrivateKey)
russh_keys::key::RsaPublic is removed (use russh_keys::ssh_key::public::RsaPublicKey)
russh_keys::key::RsaCrtExtra is removed
russh_keys::key::Signature is replaced with russh_keys::signature::Signature (signature::Signature)
Nothing published for this version
Nothing published for this version
…(#371) crates. This means there are some breaking changes, which are listed here:
russh v0.47 will drop its own data parsing and key handling code in favor of the RustCrypto project's ssh-key (#368) and ssh-encoding (#371) crates. This means there are some breaking changes, which are listed here:
russh_keys::key::PublicKey is replaced with russh_keys::PublicKey (ssh_key::PublicKey)
russh_keys::key::KeyPair is replaced with russh_keys::PrivateKey (ssh_key::PrivateKey)
russh_keys::key::parse_public_key no longer takes a hash algorithm argument as RSA keys are no longer locked down to a specific algorithm internally. RSA key specific hash algorithms are only used in Preferred::key.
Key type constants in russh_keys::key and russh_keys::key::Name are removed - use the russh_keys::Algorithm enum instead. Config::preferred::key now also takes russh_keys::Algorithms instead of russh_key::key::Names.
russh::client::Handle::authenticate_future is renamed to russh::client::Handle::authenticate_publickey_with
new russh::Error enum variants:
Error:SignatureError:SshKeyError:SshEncodingnew russh_keys::Error enum variants:
Error::RsaError::Utf8russh::auth::Signer is now an async_trait
russh_keys::ec is removed
russh_keys::encoding is removed (use russh_keys::ssh_encoding)
russh_keys::signature is removed
russh_keys::protocol is removed
russh_keys::key::SignatureHash is replaced with russh_keys::HashAlg (ssh_key::HashAlg)
russh_keys::key::SignatureBytes is removed
russh_keys::key::RsaPrivate is removed (use russh_keys::ssh_key::private::RsaPrivateKey)
russh_keys::key::RsaPublic is removed (use russh_keys::ssh_key::public::RsaPublicKey)
russh_keys::key::RsaCrtExtra is removed
russh_keys::key::Signature is replaced with russh_keys::signature::Signature (signature::Signature)
Nothing published for this version
Nothing published for this version
wasm-support: add wasm support (#351) #351 (irvingouj @ Devolutions)
AgentClient and AgentClient::dynamic()AgentClient::into_innerstreamlocal-forward for remote => local UDS forwarding (#312) (kanpov) #312server_channel_open_direct_tcpip, server_channel_open_agent_forward and server_channel_open_session now receive a Channel instead of a ChannelId. Also added should_accept_unknown_server_channel and server_channel_open_unknown callbacks.NoCommonAlgo errorKeyPair::generate_ed25519 infallibleError::Disconnect getting returned from connect instead of the more specific error type when connection fails during kex phaseNothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
4eaa080: added support for the 3des-cbc cipher. As an outdated cipher, it's not included in the defaults list and has to be explicitly enabled.
3des-cbc cipher. As an outdated cipher, it's not included in the defaults list and has to be explicitly enabled.It was possible for an attacker to cause Warpgate to allocate an arbitrary amount of memory by sending a packet with a malformed length field, potenti
It was possible for an attacker to cause Warpgate to allocate an arbitrary amount of memory by sending a packet with a malformed length field, potentially causing the application to get killed due to excessive RAM usage.
This release adds a default pure-Rust RSA implementation, meaning that you can disable the openssl feature to reduce your app size and improve portabi
openssl feature to reduce your app size and improve portability and build speed.Preferred::DEFAULT when the openssl feature is disabled.Preferred are now Cow<&'static, [Name]> instead of &'static [Name], allowing you to dynamically construct the lists. If you're using custom algorithm lists, you'll need to update your code: config.preferred = Preferred {
- kex: &[CURVE25519],
+ kex: Cow::Borrowed(&[CURVE25519]),
..<_>::default()
}
Preferred::compression items is now russh::compression::Name instead of String.Name structs now implement TryFrom<&'static str> which will validate that the named algorithm is actually implemented in the library.russh_keys::key::ALL_KEY_TYPES, russh::kex::ALL_KEX_ALGORITHMS, russh::cipher::ALL_CIPHERS, russh::compression::ALL_COMPRESSION_ALGORITHMS and russh::mac::ALL_MAC_ALGORITHMS.v0.43, russh-keys has generated incorrect key format when saving Ed25519 keys in PKCS#8 format. This is fixed in v0.44 but by default, v0.44 will fail to parse keys generated in v0.43.v0.44 to parse these keys, enable the legacy-ed25519-pkcs8-parser feature of the russh-keys crate.ecdh-sha2-nistp{256,384,521} kex support (#282) (Michael Gleason) #282-cbc ciphers. (#297) (Pierre Barre) #297ChannelId into u32Nothing published for this version
Up to v0.43, russh-keys has generated incorrect key format when saving Ed25519 keys in PKCS#8 format. This is fixed in v0.44 but by default, v0.44 wil
v0.43, russh-keys has generated incorrect key format when saving Ed25519 keys in PKCS#8 format. This is fixed in v0.44 but by default, v0.44 will fail to parse keys generated in v0.43.v0.44 to parse these keys, enable the legacy-ed25519-pkcs8-parser feature of the russh-keys crate.77cc2f7: algorithm names QoL changes
77cc2f7: algorithm names QoL changes
The fields specifying cipher algorithms in Preferred are now Cow<&'static, [Name]> instead of &'static [Name], allowing you to dynamically construct the lists. If you're using custom algorithm lists, you'll need to update your code:
config.preferred = Preferred {
- kex: &[CURVE25519],
+ kex: Cow::Borrowed(&[CURVE25519]),
..<_>::default()
}
Preferred::compression items is now russh::compression::Name instead of String.Name structs now implement TryFrom<&'static str> which will validate that the named algorithm is actually implemented in the library.russh_keys::key::ALL_KEY_TYPES, russh::kex::ALL_KEX_ALGORITHMS, russh::cipher::ALL_CIPHERS, russh::compression::ALL_COMPRESSION_ALGORITHMS and russh::mac::ALL_MAC_ALGORITHMS.ecdh-sha2-nistp{256,384,521} kex support (#282) (Michael Gleason) #282-cbc ciphers. (#297) (Pierre Barre) #297ChannelId into u32Nothing published for this version
This release adds a default pure-Rust RSA implementation, meaning that you can disable the openssl feature to reduce your app size and improve portabi
openssl feature to reduce your app size and improve portability and build speed.der crate and others (#274) (Robert Wang) #274ssh-key crate to decode OpenSSH public/private keys (#279) (Robert Wang) #279> 859e685: refactor Handler trait to use mutable reference instead of owned variables (Alessandro Ricottone) #247
Handler traits859e685: refactor
Handlertrait to use mutable reference instead of owned variables (Alessandro Ricottone) #247
The Handler traits no longer take ownership of both self and Session or have to return them. These have been replaced with normal &mut references.
You will need to update your Handler impls to match the new method signatures, for example:
async fn channel_open_session(
- self,
+ &mut self,
channel: Channel<Msg>,
- session: Session,
+ session: &mut Session,
- ) -> Result<(Self, bool, Session), Self::Error> {
+ ) -> Result<bool, Self::Error> {
...
- Ok((self, true, session))
+ Ok(true)
}
async fn auth_publickey(
- self,
+ &mut self,
_: &str,
_: &key::PublicKey,
- ) -> Result<(Self, server::Auth), Self::Error> {
+ ) -> Result<server::Auth, Self::Error> {
...
- Ok((self, server::Auth::Accept))
+ Ok(server::Auth::Accept)
}
russh::server::run moved into the Server traita592366: Move run and run_on_socket to Server trait (Alessandro Ricottone) #247
You'll need to replace the call to run with a call to Server::run_on_address, for example:
- russh::server::run(config, ("0.0.0.0", 2222), &mut server).await?;
+ server.run_on_address(config, ("0.0.0.0", 2222)).await?;
}
Preferred::key and the available host keys don't match (#262) #262> 859e685: refactor Handler trait to use mutable reference instead of owned variables (Alessandro Ricottone) #247
Handler traits859e685: refactor
Handlertrait to use mutable reference instead of owned variables (Alessandro Ricottone) #247
The Handler traits no longer take ownership of both self and Session or have to return them. These have been replaced with normal &mut references.
You will need to update your Handler impls to match the new method signatures, for example:
async fn channel_open_session(
- self,
+ &mut self,
channel: Channel<Msg>,
- session: Session,
+ session: &mut Session,
- ) -> Result<(Self, bool, Session), Self::Error> {
+ ) -> Result<bool, Self::Error> {
...
- Ok((self, true, session))
+ Ok(true)
}
async fn auth_publickey(
- self,
+ &mut self,
_: &str,
_: &key::PublicKey,
- ) -> Result<(Self, server::Auth), Self::Error> {
+ ) -> Result<server::Auth, Self::Error> {
...
- Ok((self, server::Auth::Accept))
+ Ok(server::Auth::Accept)
}
russh::server::run moved into the Server traita592366: Move run and run_on_socket to Server trait (Alessandro Ricottone) #247
You'll need to replace the call to run with a call to Server::run_on_address, for example:
- russh::server::run(config, ("0.0.0.0", 2222), &mut server).await?;
+ server.run_on_address(config, ("0.0.0.0", 2222)).await?;
}
2ce82f2: Support for NIST P-521 public keys (akeamc) #230
diffie-hellman-group16-sha512 hex (Brendon Ho) #233russh::server::run_on_socket to facilitate dropping privileges immediately after socket binding (Samuel Ainsworth) #231proceed_with_methods in "none" and "password" authentication methods (Samuel Ainsworth) #241server::ConfigNothing published for this version
Nothing published for this version
Nothing published for this version
A flaw in the SSH protocol itself allows an active MitM attacker to prevent the client & server from negotiating OpenSSH security extensions, or, with
A flaw in the SSH protocol itself allows an active MitM attacker to prevent the client & server from negotiating OpenSSH security extensions, or, with AsyncSSH, take control of the user's session.
This release adds the support for the kex-strict-*-v00@openssh.com extensions designed by OpenSSH specifically to prevent this attack.
More info: https://terrapin-attack.com
Explicitly set minimum supported Rust version (1.65)
acd744a: ChannelStream rebuild (Maya the bee) #181
ChannelStream rebuild (Maya the bee) #181
ChannelStream is now generic over the same type as the parent ChannelAsyncRead and AsyncWrite handles for a channel, as well as its extended streams with make_reader(_ext) and make_writer(_ext).Server::handle_session_error and session closure loggingChannelMsg::WindowAdjusted during data transfer (Joe Grund) #180The behaviour or server::Handler::auth_publickey method has been changed.
server::Handler::auth_publickey method has been changed.
auth_publickey_offer and will accept all offers by default.auth_publickey method, no action is needed.auth_publickey_offer.Nothing published for this version
d97cfcc: #158 - removed unsafe key exchanges from default algorithm list when the openssl feature is disabled
openssl feature is disablednone HMAC from the default algorithm listConfig::connection_timeout to Config::inactivity_timeout to better reflect its purposeCURVE25519 is now curve25519-sha256 instead of curve25519-sha256@libssh.orgcurve25519-sha256@libssh.org is still available as CURVE25519_PRE_RFC_8731Error::UnsupportedKeyType now holds a String (Lucas Kent) #161Nothing published for this version
A malicious client/server could negotiate insecure Diffie-Hellman key exchange parameters in way that leads to an insecure shared secret and breaks co
A malicious client/server could negotiate insecure Diffie-Hellman key exchange parameters in way that leads to an insecure shared secret and breaks confidentiality of the connection traffic.
Nothing published for this version
A malicious client/server could negotiate insecure Diffie-Hellman key exchange parameters in way that leads to an insecure shared secret and breaks co
A malicious client/server could negotiate insecure Diffie-Hellman key exchange parameters in way that leads to an insecure shared secret and breaks confidentiality of the connection traffic.
59bae17: #112 - parse and handle hostkeys-00@openssh.com requests
Migrated to async-trait - you'll need to simplify & clean up your Handler impelementations to use #[async_trait] and async methods (see new examples i
async-trait - you'll need to simplify & clean up your Handler impelementations to use #[async_trait] and async methods (see new examples in the docs).Channel objects - Handler::channel_open_* methods now take a Channel<> instead of ChannelId.Key::with_signature_hashserver-sig-algs protocol extension supportChannel::closeNothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
One column per quarter.