Skip to content

ReferenceThe 22 checks

SSH settings

Security checkssh

What it reads

/etc/ssh/sshd_config and the files in /etc/ssh/sshd_config.d.

Does it need root?

It reads everything it needs as a normal user.

When it passes

The report lists it as passed, in these words:

  • SSH allows neither root login nor password login
  • No SSH server on this machine

What it can find

Warning

SSH allows password login

Passwords can be guessed by automated attacks. Keys cannot. Check that your key works before you turn passwords off.

Fix
echo "PasswordAuthentication no" | sudo tee /etc/ssh/sshd_config.d/00-kiyesi-no-password.conf && sudo systemctl reload ssh
Warning

SSH allows root login

Attackers try root first. Sign in as a normal user and use sudo. Check that such a user can sign in before you turn root login off.

Fix
echo "PermitRootLogin no" | sudo tee /etc/ssh/sshd_config.d/00-kiyesi-no-root.conf && sudo systemctl reload ssh