The default install of Ubuntu is not configured with root as the main user, so you cannot login as root from the start.

1. Access/Enable the root user account:

sudo -i

Follow the instructions to enter your present password.

2. Change your root password:

passwd root

Follow the instructions.

3. Edit sshd_config to enable root login:

nano /etc/ssh/sshd_config

Lookup and change the following:
PermitRootLogin prohibit-password to PermitRootLogin yes
and
PasswordAuthentication no to PasswordAuthentication yes
(Remove the # if present in front of the word)

Save with "CTRL + x" and press "y" for yes, then hit Enter.

4. Restart the sshd service:

systemctl restart ssh

You should now be able to login with the username and credentials as root.

That's it! If you need help, feel free to contact us through our support channels.

Ha estat útil la resposta? 3 Els usuaris han Trobat Això Útil (3 Vots)