0

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?

Dave Everitt
  • 201
  • 1
  • 4
  • 11

1 Answers1

3

man sshd_config will show you that yes is the default value for PubkeyAuthentication. So you can leave it commented out; it's the same as yes.

The stock sshd_config file also includes a comment at the top, saying that it comes with the default values present but commented out.

Andrew Schulman
  • 8,811
  • 21
  • 32
  • 47