1
0
mirror of https://github.com/libssh2/libssh2.git synced 2026-10-24 03:48:58 +03:00

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 45aa5c5fa4 #2621

Refs:
https://man.openbsd.org/sshd_config#PerSourcePenalties
https://www.openssh.org/txt/release-9.8

Closes #2650
This commit is contained in:
Viktor Szakats
2026-10-04 16:11:03 +02:00
parent 10c374cad4
commit 4ab391ec9f
2 changed files with 2 additions and 1 deletions

View File

@@ -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

View File

@@ -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