How to Upload SSH Public Keys to a DigitalOcean Account

You can upload your SSH public key to your DigitalOcean account to make it easier to add your keys to your Droplets. It’s safe to freely share your SSH public key because it cannot be used to re-create the private key. It can only be used to validate the user who holds the associated private key.

Within your DigitalOcean account, click the account icon in the upper-right hand corner. From the drop-down menu, select Settings.

DigitalOcean account settings

You will be taken to the DigitalOcean accounts page. In the left-hand navigation menu, select the Security menu item to go to the security section of your account.

DigitalOcean security menu item

This will take you to the security section of your account. In the main area, there is a section for managing your SSH keys. Inside this section, click on the Add SSH Key button.

DigitalOcean add new key button

A new screen will display with two fields for SSH key content and Name. Paste the contents of your public key into the first field. In the second field, enter a name for the key that will help you easily identify it in the DigitalOcean interface.

DigitalOcean new public key prompt

Click the Add SSH Key button when you are finished. You now have a public key available within the DigitalOcean control panel:

DigitalOcean ssh key in control panel

From here, you can create a Droplet using this key by selecting the key in the Add your SSH keys section on the Droplet create page.

DigitalOcean select ssh key

If you are familiar with creating servers through DigitalOcean, you may be used to receiving an email upon creation with the authentication details and password. When you choose to embed an SSH key into your new server, you will not be sent an email. Instead, you should use your private key to sign in, which does not need a password.