To prevent successful brute force attacks to Ubuntu SSh servers, the “root” user is not enabled by default.
If you need to login as root user, you can login as a normal user and type this command:
It asks for root password obviously.
If you need to enable the root user login permanently (which is highly not recommended) you should edit the SSH configuration file, so type the command:
and find this line: “PermitRootLogin yes” and change it to “PermitRootLogin no”. Please remember you can use the “insert” key to write this lines.
Now you need to restart the SSH server:
This last command reload the configuration file which you edited before. Now you can login using the “root” user.