SSH Securing - Foren-Ken/tech-journal GitHub Wiki
To remove the ability to access root access from SSH, the following steps can be taken:
- Access
/etc/ssh/sshd_config
using a text editor (nano, vi, etc) - Find the line
PermitRootLogin
and change from "yes" to "no". If this is commented, remove the comment. - Save the file and restart sshd with the command
sudo systemctl restart sshd
Now SSH cannot be used to remotely access root.