Disabling root SSH login is one of the most effective security hardening steps.
Prerequisites
Before disabling root login, make sure you have:
- A non-root user with sudo access
- SSH key authentication configured for that user
Disable Root Login
Edit /etc/ssh/sshd_config:
PermitRootLogin noRestart SSH:
systemctl restart sshdTest Before Disconnecting
Open a new terminal window and test logging in as your non-root user before closing your current session. If it works, you're safe to close the root session.
Emergency Access
If you lock yourself out, use the VNC Console in your Kazepute portal to regain access.