njohn
By:
njohn

Getting an error while I try to ssh into the droplet.

December 16, 2013 6.5k views
Disconnected: No supported authentication methods available (server sent: publickey) http://snag.gy/KH0Cb.jpg
5 Answers
Did you add your SSH key to your droplet *and* configure putty to use it?
by Pablo Carranza
This tutorial runs through creating SSH keys with PuTTY to connect to your virtual server.

I have the same problem, how to solve? Via console anything i type asks for password, i'm locked.

I also have the same problem, added the key during droplet creation, now I can't login. What shall I do?

For anyone else having as much trouble as I did getting this to work...

First, you need to have the contents of your public key listed in a file called authorized_keys (~/.ssh/authorized_keys). I deleted the public key listed in the Settings>Security page of the DO dashboard. This allowed me to use my password when connecting to the server. Then I could edit the authorized_keys file. You have to edit the file as the user that will being using that key - not as root.

Second, you need to make sure the corresponding private key is on your local machine and your local machine knows where it is. I'm using Windows and PuTTY so I add the private key to the PuTTY session AND make sure that Pageant.exe knows about it. (Google:Pageant add key).

TIP: When you make changes in PuTTY, like changing keys and such, if you don't save the session it will not remember those changes when it opens again.

Hope this helps!

edited by kamaln7
Have another answer? Share your knowledge.