Scale up as you grow — whether you're running one virtual machine or ten thousand.

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.

This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
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.
Since the last post on this topic there have been new Docs.
As such for anyone stumbling upon this, please check this docs page and read upon the process:
https://docs.digitalocean.com/products/droplets/how-to/add-ssh-keys/
To add an SSH Key to your Droplet, you’ll need to be able to access it. Do you still have the old key that you were using? If so, SSH in to your Droplet using the old key and add your new public keys to:
~/.ssh/authorized_keys
The format is one key per line. You can remove the old key from this file.
If you don’t have the old key that you were using, you may very well be locked out as console access to the Droplet is limited to password-based authentication.
To SSH in with a key, you have to pass the -i flag and define the full path. So if your key name was:
confused
On MacOS, you’d use:
ssh root@107.170.60.7 -i ~/.ssh/confused
That being said, if you created a Droplet with one key and then overwrote it, you’ve effectively locked yourself out. The only way to get around this would be if you set a password for root, then you could try to login without it, but seeing as you’re getting:
Permission denied (publickey).
… when trying to login with ssh root@107.170.60.7, that tells me that you don’t / didn’t.