Digital Ocean

This was asked elsewhere but I think it a good topic for here

Any of you guys that use servers like digital ocean or one of the others… There’s something I don’t quite understand. If I use an SSH key to access the server, does my root account have a regular unix password too? I probably wasn’t paying attention if I set one initially.

Anyone ?

Yes, there should still be a root pw so that you can use sudo from a non-root account.

Only that sshd is configured not to let you login remotely with passwords but only with the ssh key.

Ah, nonsense what I wrote above. I just checked myself:

Correct is:

  1. When you use sudo, you enter not the root pw but your current user account’s pw.
  2. I cannot find any root pw written down for my DO instances. So there may not be one at all.

When you create the droplet you have the option to choose between SSH keys and Password:


A root password is not always needed with sudo access. Most sshd servers are configured to not allow any root-with-password logins. One of the recovery options will shutdown the droplet, install a random root password, and then email that password to you. Then you can access root via the droplet console (not ssh) from the control panel.

1 Like