Just setting up a new Debian 10 server having uploaded my public SSH keys, not restarted sshd yet.
I can now log in without password, so now doing all the usual recommended edits in /etc/ssh/sshd_config:
ChallengeResponseAuthentication no
usePAM no
PermitRootLogin no
PasswordAuthentication no
BUT I'm wondering if leaving #PubkeyAuthentication yes
commented out means "no setting" i.e. as some posts seem to indicate I can still SSH in pw-free without explicitly uncommenting this line?
man sshd_config
will show you thatyes
is the default value forPubkeyAuthentication
. So you can leave it commented out; it's the same asyes
.The stock
sshd_config
file also includes a comment at the top, saying that it comes with the default values present but commented out.