Question

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

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!

Show comments

Submit an answer

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!

Sign In or Sign Up to Answer

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.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

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.

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