Linux – really disable root ssh login

linuxrootSecuritysshsudo

I always read I should disable root login for SSH and login with a user which has sudo. But where is the difference between:

ssh root@vps 

and

ssh myuser@vps
sudo -i 

I don't have physical access to my server and need root permissions per remote access in some way. Is the only advantage here, that the username is unknown?


Security Tip: Disable Root SSH Login on Linux

One of the biggest security holes you could open on your server is to allow directly logging in as root through ssh, because any cracker can attempt to brute force your root password and potentially get access to your system if they can figure out your password.

It’s much better to have a separate account that you regularly use and simply sudo to root when necessary.

Best Answer

You answered your own question. By disabling remote access to root in *Nix or administrator access in Windows, you make it that much harder for someone to gain privileged access to your computer. If someone steals or brute-forces your non-privileged account password, then they only have limited access.

Related Question