Repository navigation
Conversation
vszakats
added a commit
that referenced
this pull request
Oct 13, 2025
To make it work with OpenSSH v10 in Debian Trixie. ECDSA (or ED25519) is required for for compatibility with the supported list of KEX algos in OpenSSH v10. ECDSA support requires targeting Windows 10, equivalent to Windows 2016 Server. Also move Windows 2016 job to the last position: Ref: b5e68bd #1461 Bug: https://ci.appveyor.com/project/libssh2org/libssh2/builds/52898449/job/t79v1xi531bq3nab Ref: #1720 Closes #1721
vszakats
added a commit
that referenced
this pull request
Oct 13, 2025
Use `HAVE_ECC` as an indicator for ECDSA when building with wolfSSL. Before this patch the OpenSSL macros were used, in particular `OPENSSL_NO_EC`, which made ECDSA support disabled with certain wolfSSL build configurations, e.g. the Ubuntu 24.04 one. ECDSA is necessary to run tests with OpenSSH v10, e.g. on Debian Trixie. Follow-up to b95e758 #666 Ref: #1720 Closes #1723
vszakats
added a commit
to vszakats/libssh2
that referenced
this pull request
Jul 2, 2026
vszakats
added a commit
to vszakats/libssh2
that referenced
this pull request
Jul 2, 2026
vszakats
added a commit
that referenced
this pull request
Jul 2, 2026
Use the last known good test container build, with debian:bookworm, for Libgcrypt tests. Also: - disable running non-containerized sshd tests in the clang-tidy job, because it uses the latest Ubuntu (26.04) which, as debian-trixie, comes with a modern OpenSSH server that's incompatible with libssh2's Libgcrypt backend: ``` 26: [libssh2] 0.055233 Failure Event: -5 - Unable to exchange encryption keys 26: libssh2_session_handshake failed (-5): Unable to exchange encryption keys 26: not ok 2 - sshd-test_auth_pubkey_ok_ed25519 26/44 Test #26: test_sshd .................................***Failed 0.58 sec # sshd executable: '/usr/sbin/sshd' (OpenSSH_10.2p1 Ubuntu) # sshd log: '/tmp/tmp.QdEw2bfbFE' # ssh executable: '/usr/bin/ssh' (OpenSSH_10.2p1 Ubuntu-2ubuntu3.2, OpenSSL 3.5.5 27 Jan 2026) # ssh log: '/tmp/tmp.TDLIzPY6zV' 1..2 ``` Ref: https://github.com/libssh2/libssh2/actions/runs/28610019322/job/84839842924?pr=2174#step:25:18669 - run Libgcrypt jobs on ubuntu-24.04 (was: ubuntu-latest) to ensure it continues working after ubuntu-latest is bumped. Ref: https://github.com/libssh2/libssh2/pkgs/container/ci_tests_openssh_server/409796170?tag=98199e448a94451491c4 Ref: #2049 Follow-up to 51f6259 #1720 Closes #2174
vszakats
added a commit
that referenced
this pull request
Aug 2, 2026
…ounds Turns out this was the root cause of CI failures seen earlier, and then worked around by reverting to older versions Docker and runner machines. Replace/revert those workarounds by enabling the necessary legacy bits in the test OpenSSH server configuration. Follow-up to 8be5716 #2174 Follow-up to 51f6259 #1720 Closes #2484
vszakats
added a commit
that referenced
this pull request
Sep 13, 2026
To help debugging issues. Also: - bump sshd LogLevel to DEBUG1, for essential details. - bump command output buffer in `run_command_varg()` - drop redundant condition in `run_command_varg()` - replace `BUFSIZ` with literal sizes in `run_command_varg()`. After this patch it's showing this in the CI log for the libgcrypt fallout that previously needed a long time to diagnose: ``` 61: ---- sshd log ---- 61: No matching private key for certificate: /etc/ssh/ssh_host_mldsa44-ed25519_key-cert.pub 61: Server listening on 0.0.0.0 port 22. 61: Server listening on :: port 22. 61: debug1: sshd-session version OpenSSH_10.5, OpenSSL 3.6.3 9 Jun 2026 61: Connection from 172.17.0.1 port 51878 on 172.17.0.2 port 22 rdomain "" 61: debug1: sshd-auth version OpenSSH_10.5, OpenSSL 3.6.3 9 Jun 2026 [preauth] 61: debug1: list_hostkey_types: rsa-sha2-512,rsa-sha2-256,ssh-rsa,[email protected], [email protected],[email protected],ecdsa-sha2-nistp256, [email protected],ssh-ed25519,[email protected] [preauth] 61: debug1: Local version string SSH-2.0-OpenSSH_10.5p1 Debian-1 [preauth] 61: debug1: Remote protocol version 2.0, remote software version libssh2_1.11.2_DEV [preauth] 61: debug1: compat_banner: no match: libssh2_1.11.2_DEV [preauth] 61: debug1: SSH2_MSG_KEXINIT sent [preauth] 61: debug1: SSH2_MSG_KEXINIT received [preauth] 61: debug1: kex: algorithm: (no match) [preauth] 61: Unable to negotiate with 172.17.0.1 port 51878: no matching key exchange method found. Their offer: diffie-hellman-group-exchange-sha256,diffie-hellman-group16-sha512, diffie-hellman-group18-sha512,diffie-hellman-group14-sha256,diffie-hellman-group14-sha1, diffie-hellman-group1-sha1,diffie-hellman-group-exchange-sha1,ext-info-c, [email protected] [preauth] [...] 61: ------------------ ``` Follow-up to 1d0b86a #2484 Follow-up to 8be5716 #2174 Follow-up to 51f6259 #1720 Closes #2621
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.
Tests started failing after touching
sshd_config, which bumpedthe test container from Debian Bookworm to Trixie, and openssh-server
from 9.2p1 to 10.0p1 with it. OpenSSH v10 no longer supports legacy KEX
algos
diffie-hellman-group*anddiffie-hellman-group-exchange-*,making libssh2 require ECDSA or ED25519 to enable
curve25519-sha256*or
ecdh-sha2-*, for the tests to succeed.libgcrypt, stock Ubuntu wolfSSL, and WinCNG CI jobs broke.
by wolfSSL in certain cases (but not on Ubuntu 24.04 with the stock
v5.6.6 build), and by WinCNG when explicitly enabled, and targeting
Windows 10/2016 Server.
Fixed by:
wolfSSL support received an ECDSA detection fix, that resolved
the issue with the stock Ubuntu builds, via:
b807dac wolfssl: fix detecting ECDSA support #1723
WinCNG had ECDSA enabled in CI in the job running tests, via:
0f58438 appveyor: enable WinCrypt ECDSA in tests, move to Windows 2016 #1721
to make CI pass, disable running tests with Libgcrypt in this patch.
An alternate option is to downgrade to Bookworm, with the undesired
effect that its openssh-server doesn't support ML-KEM and other modern
SSH features, meaning those could not be tested once implemented in
libssh2, e.g. in #1644.
Ref: https://www.openssh.com/txt/release-10.0
Ref: https://packages.debian.org/trixie/openssh-server
Ref: https://packages.debian.org/bookworm/openssh-server
Ref: https://packages.ubuntu.com/noble/libwolfssl-dev
Bug: #1718 (comment)
Follow-up to 4f9e6e0 #1718
Rant: I find it super annoying that each time this breaks (which is: frequently),
all the error message says is "-5 unable to exchange keys", without any
specifics about what was offered by the server, and libssh2 itself, and what
was the issue in more detail.