Public Cloud root

The public cloud makes use of an “admin” user by default for SSH connections rather than root, in addition to this, the public cloud also uses SSH keys compared to the conventional password for added security.

In the event where by you wish to make use of privileged access on the public cloud, you would need to prefix each command with: sudo. Whilst this will provide you with the root level access for the installation of files you may wish to use the root user on a temporary basis for that particular session. We can become root throughout the session with the command of sudo su, this will allow us to become the root user.

Whilst we are now the root user rather than admin, we can also define a password for the root user so that we can login as root if needed via a password rather than an SSH key. We can make use of the command passwd.

admin@mysuperweb:~$ sudo su

root@mysuperweb:/home/admin# passwd

Enter new UNIX password: *****
Retype new UNIX password: *****
passwd: password updated successfully

root@mysuperweb:/home/admin#

To login to the root user directly you need to edit the file at:

nano /root/.ssh

You need to edit the first line and add the value of "#" to comment out the entry.

#no-port-forwarding,no-agent-forwarding,no-X11-forwarding,command="echo 'Please login as the user \"debian\" rather than the user \"root\".'