By default, the root user has full control over your VPS. Disabling direct root login helps prevent brute-force attacks. Here’s how to do it:
- Create a new user with sudo access (not root).
- Edit the SSH config file (
/etc/ssh/sshd_config) and setPermitRootLogin no. - Restart the SSH service to apply changes.
This simple step adds an extra layer of security to your VPS.
