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 ( 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.


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.

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:

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.

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.

Hello there,

You can check our article on How to Upload an SSH Public Key to an Existing Droplet

You can access the droplet from the DigitalOcean console and then temporary enable the PasswordAuthentication on your droplet and access the droplet with a password to upload the ssh-key.

If you haven’t created new pair of keys you’ll need to do that first.

You can enable PasswordAuthentication for your Droplet by modifying your /etc/ssh/sshd_config file. Once set to Yes restart the SSH service and connect via an SSH client for a more stable connection. You can then modify your ~/.ssh/authorized_keys file to add the appropriate public key.

This change can be made from the DigitalOcean’s console. If you’re having issues accessing the console you can then reach to our amazing support team that can help you further with this.

To enable the PasswordAuthentication follow these steps:

  1. Login to the console on the DigitalOcean website.
  2. Type sudo nano /etc/ssh/sshd_config
  3. Change PasswordAuthentication from “no” to “yes” and save the file
  4. Open a terminal on your computer and type ssh username@[hostname or IP address] or if on a Windows box use PuTTY for password login making sure authentication parameters aren’t pointing to a private key
  5. Login with a password
  6. Type sudo nano ~/.ssh/authorized_keys
  7. Paste public key text here and save the file
  8. Type sudo nano /etc/ssh/sshd_config
  9. Change PasswordAuthentication from “yes” to “no” and save the file
  10. Log out and attempt to log back in (if using PuTTY make sure you set up auth parameters to point to your private key)

You can then upload the key using this command:

ssh-copy-id -i ~/.ssh/mykey user@droplet

Hope that this helps! Regards, Alex

This: “No supported authentication methods available (server sent: publickey)” happened to me after I turned on Microsoft One Drive backup and sync for my files including the directory where I save my ssh key. In my case the solution is simple: just go to Putty => SSH => Auth and just (re)browse again to my same key and save, then it worked. It looks backup and sync software such as Microsoft One Drive (and may be the same with Google Drive), affect the way Putty sees and identifies directories if the key directory is specified then later installing or turning on backup and sync including that directory.

I never got PuTTY to work, but I was able to use ssh-keygen and ssh root@IP from Git Bash.

In my case, I removed default login name from putty and it worked

@thelunchbawx, I am having the exact same problem. Did you figure out a solution?


The public key generated by puttygen cannot be used directly on Ubuntu you need to change its format as mentioned here

Hope this helps