Repository navigation
Conversation
vszakats
added a commit
that referenced
this pull request
Jul 2, 2026
Also bail out right away to avoid other issues down the line.
Seen in CI when Libgcrypt could not negotiate keys with modern sshd
server on Ubuntu 26.04:
```
26: 1..2
26: Failure establishing SSH session: -5
26: Fingerprint: /home/runner/tests/test_sshd.test: line 151: 8233 Segmentation fault
(core dumped) ${LIBSSH2_TEST_EXE_RUNNER:-} "${test}"
26: not ok 1 - sshd-test_ssh2
26: libssh2_session_handshake failed (-5): Unable to exchange encryption keys
```
Ref: https://github.com/libssh2/libssh2/actions/runs/28582866680/job/84747161004?pr=2174
Ref: #2174
Closes #2179
To avoid:
```
test 26
Start 26: test_sshd
26: Test command: /usr/bin/sh "-c" "/home/runner/work/libssh2/libssh2/tests/test_sshd.test /home/runner/work/libssh2/libssh2/bld/tests/test_ssh2 /home/runner/work/libssh2/libssh2/bld/tests/test_auth_pubkey_ok_ed25519"
26: Working Directory: /home/runner/work/libssh2/libssh2/bld/tests
26: Environment variables:
26: srcdir=/home/runner/work/libssh2/libssh2/tests
26: SSHD=/usr/sbin/sshd
26: Test timeout computed to be: 10000000
26: # sshd executable: '/usr/sbin/sshd' (OpenSSH_10.2p1 Ubuntu)
26: # sshd log: '/tmp/tmp.FhzoiD6eOR'
26: # ssh executable: '/usr/bin/ssh' (OpenSSH_10.2p1 Ubuntu-2ubuntu3.2, OpenSSL 3.5.5 27 Jan 2026)
26: # ssh log: '/tmp/tmp.1dpXSksRzx'
26: 1..2
26: Failure establishing SSH session: -5
26: Fingerprint: /home/runner/work/libssh2/libssh2/tests/test_sshd.test: line 151: 8233 Segmentation fault (core dumped) ${LIBSSH2_TEST_EXE_RUNNER:-} "${test}"
26: not ok 1 - sshd-test_ssh2
26: libssh2_session_handshake failed (-5): Unable to exchange encryption keys
26: Trace all enabled for connect_to_server.
26: not ok 2 - sshd-test_auth_pubkey_ok_ed25519
26/44 Test libssh2#26: test_sshd .................................***Failed 0.25 sec
1..2
Failure establishing SSH session: -5
Fingerprint: /home/runner/work/libssh2/libssh2/tests/test_sshd.test: line 151: 8233 Segmentation fault (core dumped) ${LIBSSH2_TEST_EXE_RUNNER:-} "${test}"
not ok 1 - sshd-test_ssh2
libssh2_session_handshake failed (-5): Unable to exchange encryption keys
Trace all enabled for connect_to_server.
not ok 2 - sshd-test_auth_pubkey_ok_ed25519
```
Ref: https://github.com/libssh2/libssh2/actions/runs/28582866680/job/84747161004?pr=2174#step:25:469
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.
Use the last known good test container build, with debian:bookworm, for
Libgcrypt tests.
Also:
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:
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