SSH Key problem Ubuntu 14.04. Password is need although my home machine and droplet are paired!?

Posted July 1, 2015 7k views

I’m new to digital ocean and I used the automagical add SSH Key form to share my public key, however when I ssh from my mac I am prompted for a password. I never used a passphrase when generating the keys so why am I prompted for a password when none was applied and how can I fix it?

droplet using Ubuntu 14.04

  • can you sftp into your droplet? if so, you might want to browse to /home/youruser/.ssh/ and look in authorized_keys to see if your pubkey is in there. If not, add it.

    unless you are using root, in which case you would browse to /root/.ssh

  • SFTP won’t work since I can’t establish a ssh session without the “password”. I’ll just destroy the current keys and do this all in the terminal. I was hoping the “SSH Key” feature would work, however it seems that other people run into similar problems. Thanks for the input though!

  • Ugh. I’ll have to destroy my droplet and try a 4th time. Also when I set up my droplet initially no password was sent to my email address so I’ve reset it and the new pw does not work. I’d like to use this service but man this is a bit absurd.

    I’ve followed all of the directions and tutorials and still no dice. I guess I’ll just open a ticket. Yay!!

  • There is probably some simple step you are missing. It really works quite well. I create new droplets each month and add my ssh keys with no problem.

    First, you must add your ssh key(s). Then, when you are creating a new droplet, you choose which keys will be added to that droplet…you have to click on the keys or it wont add them to that droplet.

  • Show 6 more comments

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.

Submit an Answer
2 answers

Something similar happens to me also. I have created a droplet and I have applied my existing ssh keys during droplet creation. Everything was working on the first attempt. When I come back the other day it prompts for a password. The same happened with another droplet before.

I was having the same problem. It turns out that at some point a line feed was added in the middle of the ssh key on Digital Ocean’s side. The fingerprint is still identical but ssh doesn’t work. Make sure the key you are pasting into your settings does not have any line breaks in it.