From 4ab391ec9f2ada76ea8239e388b57b9b17ec0069 Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Sun, 4 Oct 2026 16:11:03 +0200 Subject: [PATCH] tests: set `PerSourcePenalties` for sshd, bump debug level to 2 To silence a warning, in rare failure cases: ``` srclimit_penalise: ipv4: new 172.17.0.1/32 deferred penalty of 1.000 seconds for penalty: connections without attempting authentication ``` Ref: https://github.com/libssh2/libssh2/actions/runs/37207427612/job/111451438515?pr=2649#step:25:537 Also: - seize the opportunity and bump sshd debug level to 2. Level 1 is too low to see clearly in some cases. Ref: https://github.com/libssh2/libssh2/pull/2649 Follow-up to 45aa5c5fa40e994acf05019cd22ba96576f8309e #2621 Refs: https://man.openbsd.org/sshd_config#PerSourcePenalties https://www.openssh.org/txt/release-9.8 Closes #2650 --- tests/openssh_server/Dockerfile | 1 + tests/openssh_server/sshd_config | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/openssh_server/Dockerfile b/tests/openssh_server/Dockerfile index 427562bb..98d12e7b 100644 --- a/tests/openssh_server/Dockerfile +++ b/tests/openssh_server/Dockerfile @@ -63,6 +63,7 @@ RUN echo 'HostCertificate /etc/ssh/ssh_host_rsa_key-cert.pub' >> /etc/ssh/sshd_c RUN echo 'HostCertificate /etc/ssh/ssh_host_ecdsa_key-cert.pub' >> /etc/ssh/sshd_config RUN echo 'HostCertificate /etc/ssh/ssh_host_ed25519_key-cert.pub' >> /etc/ssh/sshd_config RUN echo 'HostCertificate /etc/ssh/ssh_host_mldsa44-ed25519_key-cert.pub' >> /etc/ssh/sshd_config +RUN echo 'PerSourcePenalties no' >> /etc/ssh/sshd_config # SSH login fix. Otherwise user is kicked off after login RUN sed 's/session\s*required\s*pam_loginuid.so/session optional pam_loginuid.so/g' -i /etc/pam.d/sshd diff --git a/tests/openssh_server/sshd_config b/tests/openssh_server/sshd_config index 41b35e1e..07e1499d 100644 --- a/tests/openssh_server/sshd_config +++ b/tests/openssh_server/sshd_config @@ -2,7 +2,7 @@ # # SPDX-License-Identifier: BSD-3-Clause -LogLevel DEBUG1 +LogLevel DEBUG2 CASignatureAlgorithms +ssh-rsa HostKeyAlgorithms +ssh-rsa,ssh-rsa-cert-v01@openssh.com