Report this

What is the reason for this report?

Pub key authentication, Putty, Password authentication

Posted on December 25, 2022

Riddle me this:

I have spent the last 2.3 hours trying to figure this out. I am actually losing my mind, any help is greatly appreciated.

When creating my droplet I decided to use pub key authentication. I manage to ssh, it works great.

I have a friend who wants to ssh through Putty, but it is not working. We have converted private key into format that Putty supports but it would always return error: SSH Public Key - No supported authentication methods available

After some time I decided to just disable Pubkey authentication and enable password only. So I went to sshd config, set pubkeyauthentication to no and passwordauthentication to yes and restarted my ssh. Now when I try to login, it asks for password and then refuses it even though its correct. And when my friend tries to login it, as soon as he enters username it says No supported authentication methods available.



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.

Hi @urostadic,

How do you know it’s correct, how did you change the password?

Additionally, which part of the SSH key you added to your Droplet and to Putty? Basically, on your Droplet, you add the contents of your public key to the ~/.ssh/authorized_keys file and then in Putty add the contents of the private key without any conventions.

You might have your friend install cygwin on his PC. This is always easier for me when I am forced to use Windows. https://www.cygwin.com/

Hello @urostadic

I’ll recommend re-enabling pubkey authentication and then adding the ssh-key of your friend to the droplet.

You can follow this article on how to add an ssh key to an existing droplet.

https://docs.digitalocean.com/products/droplets/how-to/add-ssh-keys/to-existing-droplet/

Regards

The developer cloud

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

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.