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

Posted October 4, 2014 5.6k views

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:

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:

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!

1 comment

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.

Submit an Answer
2 answers

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:

  • The former developer returned and he enabled the password based login.
    But anyways, I am adding you to skype so that I may ping you in case of any issues.

If you can’t login to root via a password, this means that your sshdconfig file in **/etc/ssh/sshdconfig** 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@yourserver at all through either your Terminal or PuTTy, you can override this by setting back your sshdconfig to default. Follow the steps below:

I’m using Ubuntu.

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

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

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