odd config behaviour

Brian Candler b.candler at pobox.com
Mon Mar 7 05:24:32 AEDT 2022


On 05/03/2022 17:20, M Rubon wrote:
> Thank you for your help and suggestions!  Looks like there was a
> problem in 8.2 but it is gone in 8.9.  So this impacts Ubuntu 20.04
> LTS.  I can explore further if anyone has questions

I did a similar test, also on Ubuntu 20.04 with openssh-server 
1:8.2p1-4ubuntu0.4

My main sshd_config has the following:

# egrep -v '^(#|$)' /etc/ssh/sshd_config
Include /etc/ssh/sshd_config.d/*.conf
PasswordAuthentication no
ChallengeResponseAuthentication no
UsePAM yes
X11Forwarding yes
PrintMotd no
AcceptEnv LANG LC_*
Subsystem    sftp    /usr/lib/openssh/sftp-server

As expected, password authentication is not offered.

(1) if I create /etc/ssh/sshd_config.d/brian.conf with

Match user brian
PasswordAuthentication yes

then this has no effect - attempting to login as 'brian' only offers 
publickey.

(2) But if I add those two lines directly to the bottom of 
/etc/ssh/sshd_config, then they *do* take effect.

(3) If I put those lines in /root/brian.conf and add

Include /root/*.conf

to the *end* of sshd_config, then has no effect - same as (1).

Regards,

Brian.




More information about the openssh-unix-dev mailing list