SSH: Server refused our key.

I am getting back into web development and cannot connect to ANY newly created droplet using a SSH key.

Steps I Took:

  1. Generate a new SSH key using PuttyGen
  2. Add that key to DigitalOcean using the ‘public key’
  3. Add “root” as the username to use in Putty
  4. Add the SSH key’s private key in Putty
  5. Click “Open”.
  6. Putty throws “server refused our key” error.

This happens on ANY and ALL droplets I create AND with any SSH Key I generate.

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.

Site Moderator
Site Moderator badge
January 31, 2024

Heya, @lwgshane

I’m glad that you’ve sorted the issue. I would like to share this article on how to use Visual Studio Code for remote development. I believe it may come in handy when it comes to web dev and code deployment.

Hope that this helps!

Bobby Iliev
Site Moderator
Site Moderator badge
January 27, 2024


Happy to hear that you’ve got this all sorted out by upgrading to the latest version of Putty! And thank you for sharing that information here with the community.

For anyone who might come across this in the future as well, here is a step by step guide on how to connect to your Droplets using Putty:



Site Moderator
Site Moderator badge
January 24, 2024

Heya @lwgshane,

Can you share your logs?

Additionally, what you can do is try and use the WebConsole to connect via SSH to your Droplet:

Once inside, go to /root/.ssh/authorized_keys check if the public key is properly added, is it the same as the one you added or do you see any other problems?

Additionally, can you share the logs when trying to connect as well?

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

Featured on Community

Get our biweekly newsletter

Sign up for Infrastructure as a Newsletter.

Hollie's Hub for Good

Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.

Become a contributor

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

Welcome to the developer cloud

DigitalOcean makes it simple to launch in the cloud and scale up as you grow — whether you're running one virtual machine or ten thousand.

Learn more
DigitalOcean Cloud Control Panel