Repository navigation
Bump ssh2 to 0.9.7 and keep the host key preference - #25
Merged
Merged
Conversation
ssh2 0.9.7 pulls libssh2-sys 0.3.4, which bundles a newer libssh2 snapshot with security fixes. That libssh2 prefers Ed25519 over ECDSA host keys, so servers holding both would present a different key and every stored host_key fingerprint would be reported as changed. Pin the host key preference to the order libssh2-sys 0.3.3 used (minus the SHA-1 ssh-rsa/ssh-dss entries the new library dropped) and test offline that the client offers exactly that list in its KEXINIT. Servers offering only SHA-1 algorithms (ssh-rsa, diffie-hellman-group14-sha1, hmac-sha1) are no longer supported. Co-Authored-By: Claude Opus 5.5 <[email protected]>
The bundled libssh2 in libssh2-sys 0.3.4 no longer supports SHA-1 ssh-rsa or ssh-dss host keys, so servers that only offer those now fail at the key exchange. Turn that failure into a German hint about outdated host keys instead of passing on only libssh2's generic message, and note in both READMEs that such servers are no longer supported. Co-Authored-By: Claude Opus 5.5 <[email protected]>
bl0rb
force-pushed
the
deps/ssh2-0.9.7
branch
from
November 9, 2026 07:40
9d3e39f to
82d84eb
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Replaces #24.
ssh2 0.9.7 pulls in libssh2-sys 0.3.4. It bundles a libssh2 1.11.2_DEV snapshot with fixes for the 2025/26 libssh2 CVEs, including bugs a malicious server can trigger before login (e.g. EXT_INFO DoS, packet_length bounds, sftp_symlink OOB read, ETM/chacha20/AES-GCM overflows).
Why not #24 as is
The new libssh2 puts Ed25519 (and certificate types) ahead of ECDSA in its host-key order.
sftp.rsfingerprints whichever key the server presents. On a default OpenSSH server (RSA+ECDSA+Ed25519 keys), every existing OpenSitePilot user would hitHostKeyChangedafter updating, with no way in the app to recover.Changes
ssh2 = "0.9.7". Cargo.lock only changes ssh2 and libssh2-sys (no unrelated re-resolution).sftp.rs: a newnew_session()setsmethod_pref(MethodType::HostKey, HOSTKEY_PREF)before the handshake.HOSTKEY_PREFis the exact libssh2 0.3.3 order, minusssh-rsa/ssh-dss, which the new library no longer supports.ssh-rsa/ssh-dsshost keys are no longer supported.Verification
HOSTKEY_PREFis supported;HOSTKEY_PREFexactly (this fails without the pin);ssh-rsa(SHA-1)-only server no longer connects. That is expected and documented.cargo test --workspace(156 passed) andclippyare clean.Release note
Servers that only offer SHA-1 algorithms (
ssh-rsa,ssh-dss,diffie-hellman-group14-sha1,hmac-sha1), such as OpenSSH < 7.2 or old NAS/embedded devices, are no longer supported.🤖 Generated with Claude Code