SSH Securing - Foren-Ken/tech-journal GitHub Wiki

To remove the ability to access root access from SSH, the following steps can be taken:

  1. Access /etc/ssh/sshd_config using a text editor (nano, vi, etc)
  2. Find the line PermitRootLogin and change from "yes" to "no". If this is commented, remove the comment.
  3. Save the file and restart sshd with the command sudo systemctl restart sshd

Now SSH cannot be used to remotely access root.