(Bug) Create droplet with SSH then disable SSH for root
I found a bug when I followed the first steps to creating a securing the server.
The problem :
You don’t know the password for root when creating a droplet with an ssh key
Reproduce the problem :
- Create a droplet with an ssh key
- Connect to server with ssh key
- Create a new user and add ssh connection
- Disable ssh for root (security measure)
- Try to do
sudowith the new user
You’re asked to enter a password for
root but DigitalOcean didn’t send the password by email because I created the droplet with an ssh key.
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.×