Root password expired upon droplet creation

September 6, 2014 1.5k views


I have a droplet image that I boot through the API every now and then. Using cron this droplet executes a number of computing tasks, and when done, shuts itself down (through the API).

However since recently this no longer works. Upon creating the image, the root password that is set by DigitalOcean is expired. This means that the computing tasks that are supposed to start by cron do not run - since they are waiting for the root account password to be unlocked/reset.

So far the only way to get this to work is to actually log in to the server through SSH and set a new root password. This is not something that I like to do as the process of creating, computing and destroying should be automatic.

Is there any way to not have the root password (set by DigitalOcean when creating a droplet from my image) be expired? Or alternatively, change the configuration of the image to ignore the fact that a password is expired - basically allowing cron to run even though the password is expired.


1 Answer

If you setup an SSH key pair and supply the the public key when creating the droplet, you will not need to provide or reset the password. This has the added benefit of making your droplet more secure.

by Etel Sverdlov
This guide is for Mac OS X and Linux users. Learn how to use SSH Keys with DigitalOcean Droplets.
Have another answer? Share your knowledge.