Options for sshd aren't applied
Created by: h3artbl33d
Description
Options set in the sshd
configuration don't seem to applu or have any effect.
Expected behaviour
Changing the sshd_config
and restarting the sshd
daemon should apply the changed configuration.
Actual behaviour
Changing the sshd_config
and restarting the sshd
daemon doesn't apply the changed configuration.
Test setup
This issue applies to (at least) HardenedBSD v12.1-stable (FreeBSD 12.1-STABLE-HBSD (HARDENEDBSD) #0 : Sat Jun 20 17:09:01 UTC 2020
) and originates at least to HardenedBSD-12-STABLE-v1200059.3
(didn't test with older builds).
Furthermore, this issue seems specific for HardenedBSD and was confirmed to be absent in FreeBSD $host 12.1-RELEASE-p1 FreeBSD 12.1-RELEASE-p1 GENERIC amd64
Reproduce
- Set the following options, as an example, in
/etc/ssh/sshd_config
:
PasswordAuthentication=no
MaxAuthTries=2
- Restart
sshd
- Connect with:
ssh -o PreferredAuthentications=password -o PubkeyAuthentication=no [system]