You very likely have an XY Problem. While it is technically possible to set up Ubuntu to log in as the root user (if you know what you're doing), it isn't generally recommended. You definently don't want a publicly-accessible computer (or VPS) to have root password login enabled over SSH.
Some VPS providers of some OS's do root login by default, but even there, I'd suggest setting up a normal user account to use unless you have a reason for root.
If you really need to login as root, and not use sudo
, please use SSH key login. Ideally, and this isn't always possible (and if you do it wrong, you can get locked out of your system), but if you can, also try to have it be SSH-keys only so you can't login with a password at all.
Side note: if you're on a Windows computer trying to SSH to a cloud VPS, you'll want something like ssh [email protected]
(but with your IP address). Or, if you have a DNS A record pointing to your VPS, you could do ssh [email protected]
(but with your domain). The latter option may not work if you have a caching proxy for all requests to that domain. Doing ssh username@localhost
from Windows will try to SSH into Windows itself, which isn't likely to be what you want.