Unable to SSH via key

I am able to log in via console access, but would prefer to use XShell / Putty, but have not been able to login using a key.

Via console access, I can see that the key in ~/.ssh/authorized_keys is identical to the one on my local box (character for character, plus. I can also see that the fingerprints are identical). Yet, I get this error from XShell:

“The selected user key is not registered in the remote host. Try again.”

When I try with Putty (obviously with a correct key), I get this error:

“Disconnected: No supported authentication methods available (server sent: publickey)”

I’ve lost count of how many official DO tutorials I’ve gone through. I’ve also tried speaking with customer support on two separate tickets and it’s been an incredibly frustrating experience as each time I reply, I get a reply from a completely different tech, and not one of them has actually read my ticket fully.

Clearly, I have done something wrong, I just don’t know how to determine what that is. I would be most grateful for any advice on how I can debug this further please. I am leaning heavily towards moving to DO, but at this point am having to consider Vultr as I’ve already wasted a week just trying to figure out how to SSH in to my own server. :/

Thank you very much

Submit an answer

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!

Sign In or Sign Up to Answer

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.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

Hey @appl3s !

Unfortunate to hear you are having trouble with setting up ssh keys. This can sometimes be a pain to setup, but once you got the hang of it …

This could actually be any kind of problem, it could be:

  • Indeed a wrong key, on either side
  • A wrong permissions set
  • A wrong configuration
  • A problem with the Client you are using

I always try to exclude things by checking logs, and testing out.

"Disconnected: No supported authentication methods available (server sent: publickey)"

This most of the time means that you’re not providing an SSH key at all, or a wrong one. Please first of all tell me how you are configuring your client. And also give some logs you can find on your server.

You can also first check out my tutorial about setting up SSH keys on Debian, this should be the same on Ubuntu, except restarting SSHD will probably be like:

service ssh restart

Hope this was hopefull for you.