Only public keys to log into sshd

The file /etc/ssh/sshd_configmust be modified. Search for the following lines and make sure they are uncommented and have the appropriate value:


PasswordAuthentication no PermitRootLogin no

Save and restart the server with systemctl ssh restart.

Leave a Reply

Your email address will not be published. Required fields are marked *