Report this

What is the reason for this report?

Unable to add (another) ssh keys for ssh login to an existing droplet

Posted on October 4, 2014

We had a former remote developer working with us who configured the droplet. He has now left the team and we have a new developer located at a different remote location. We added the ssh keys as provided by our new developer (to windows 8.1 pc using putty) as given in this tutorial: https://www.digitalocean.com/community/tutorials/how-to-use-ssh-keys-with-putty-on-digitalocean-droplets-windows-users

But yet we were getting “Disconnected: No supported authentication methods available (server sent: publickey)”

On further research, it looks like we need to add the ssh keys to already running droplet like this: https://www.digitalocean.com/community/questions/add-ssh-key-into-existing-droplet

The solution in above link was to login as root. But the issue is that the ssh keys are configured to login as root only with that developer’s computer. So now what shall we do so that we can have the new developer’s ssh keys added to this running droplet?

Also we tried to login using the root credentials using putty. But it looks like the password based authentication has been disabled.

Please help asap so that we can login and continue further work!



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.

rahulserver if you are still having issues hit me up on skype and I will walk you through this.

My Skype ID is: mrrcp84 or Email: romanparish@gmail.com

If you can’t login to root via a password, this means that your sshd_config file in /etc/ssh/sshd_config has set authentication to be via sshkeys only and that the sshd_config file has set: PasswordAuthentication No

For the benefit of others who may no longer have any way to ssh access to root@your_server at all through either your Terminal or PuTTy, you can override this by setting back your sshd_config to default. Follow the steps below:

I’m using Ubuntu.

Note: The pastebin file is the default sshd_config file. The wget will save the default sshd_config file in your server in which you then have to move it to the correct directory.

  • Type in: mv sshd_config /etc/ssh/sshd_config
  • Restart ssh: service ssh restart

You can now ssh login into your server through Terminal or PuTTy and generate new ssh keys.

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.