Sounds like you don't know your root password, if even su
refuses your password.
Hence, what you should do is reset your root password. Having sudo su
, run passwd
, type in your new passphrase twice when prompted, ...
Now you don't necessarily need to know of your root password. If you're already using some RSA key logging into your VPS, you should be able to authorize that key connecting as root.
And even though: you don't necessarily need to log in as root. If you can sudo from a management user, why would you want your root account to be authorized logging into your SSH server?
Assuming you just want to login using SSH keys, change your sshd_config
:
PermitRootLogin without-password
PasswordAuthentication no
Assuming you prefer to prevent root from using SSH, just go with:
PermitRootLogin no
PasswordAuthentication no
If and only if, you're sure you want root password authentication to be allowed over SSH, knowing of your su
password, you may consider going with:
PermitRootLogin yes
PasswordAuthentication yes
If you want to make sure root password authentication is disabled system-wide, you could run (as root):
passwd -d
As of your last edit, in regards to sudo su
failing with This account is currently not available.
: this would indicate your root account shell was changed to something like nologin
.
Try this: sudo su -s /bin/bash
.
Assuming it did open a root shell, you may then want to change your root shell using chsh
.