Question

Putty error: No supported authentication methods available (server sent: publickey)

I am trying to setup a server for my wordpress site. I was going through this tutorial (https://www.digitalocean.com/community/tutorials/initial-server-setup-with-ubuntu-16-04) to setup ssh keys. After step five when it says to try logging in with the ssh keys with the newly created user putty returns back with a error saying: “No supported authentication methods available (server sent: publickey)” I put the public key in the authorized_keys file and everything the tutorial said but it still returns that error. If I try logging in to root with the same private key it works fine. It just shows that error when I try logging in with the new user.

Any help would be appreciated.

Subscribe
Share

Ensure the pubic key is under the user’s home you want to login as. You can add here: => sudo nano /home/(my_new_user)/.ssh/authorized_keys

I guess you have loaded the .pem file first and then generated the Public key and private key by randomness.

But if you generate key-pair by randomness and them upload .pem file to generate Public and private key pair then you won’t get this error.

I would also like to mention, I made the keys with Puttygen and I added the public key to digitalocean. I used the key when creating the droplet.


Submit an 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, I resolved this by using PuTYY Generator. Click Conversion/Import key from the menu Then select the private key generated previously from the terminal and finally save the new private key. I used this new generated private key to connect via SSH using putty to the droplet and it works for me.

Hi, I resolved this by using PuTYY Generator. Click Conversion/Import key from the menu Then select the private key generated previously from the terminal and finally save the new private key. I used this new generated private key to connect via SSH using putty to the droplet and it works for me.

Hi, I resolved this by using PuTYY Generator. Click Conversion/Import key from the menu Then select the private key generated previously from the terminal and finally save the new private key. I used this new generated private key to connect via SSH using putty to the droplet and it works for me.

I also had this problem, login from putty as root was fine but from the non-root user gave me the error above. I tried the methods given in the link but it didn’t help, eventually I managed to do it by following this guide: https://www.vultr.com/docs/using-your-ssh-key-to-login-to-non-root-users

I also had this problem, login from putty as root was fine but from the non-root user gave me the error above. I tried the methods given in the link but it didn’t help, eventually I managed to do it by following this guide: https://www.vultr.com/docs/using-your-ssh-key-to-login-to-non-root-users

I also had this problem, login from putty as root was fine but from the non-root user gave me the error above. I tried the methods given in the link but it didn’t help, eventually I managed to do it by following this guide: https://www.vultr.com/docs/using-your-ssh-key-to-login-to-non-root-users

I also had this problem, login from putty as root was fine but from the non-root user gave me the error above. I tried the methods given in the link but it didn’t help, eventually I managed to do it by following this guide: https://www.vultr.com/docs/using-your-ssh-key-to-login-to-non-root-users

I also had this problem, login from putty as root was fine but from the non-root user gave me the error above. I tried the methods given in the link but it didn’t help, eventually I managed to do it by following this guide: https://www.vultr.com/docs/using-your-ssh-key-to-login-to-non-root-users

In my case the KiTTY session wasn’t pointing to my .pkk file (it wasn’t pointing to any file at all).

I had this issue and I solved it in a very odd way. I notice that my droplet was having issues identifying my public key once I pasted in the SSH public key options in digital ocean, also, I try modify the authorization file in the /.ssh folder by copy pasting the key in there. I notice something interesting, the copy pasting feature on the restoration console in digital ocean seems to be mess up. I notice that while pasting a lot of my keys where confuse for different ones. In my desperation, I went through the taxing task of copying the public key manually in the authorization file and this worked! I hope this save someone from a lot of headaches.