Report this

What is the reason for this report?

Trouble with SSH key pairs windows client

Posted on June 1, 2014

Hi all, Trying to set up SSH key pair access to my droplet using PuTTy on Win7 and just about ready to open a vein :( Here are the steps I followed.

  1. Generate key pair in PuTTyGen
  2. Use the public key value in the generated key box and paste into authorized_keys on my server. (If you click save keys you get the PuTTy format.)
  3. Conversions - Export OpenSHH key
  4. Add this key under SSH - Auth in the PuTTy profile set-up.
  5. Restart SSH on droplet
  6. Try to connect in PuTTy. I always get Unable to use key file …

Is there not an OpenSSH utility for windows that creates compliant, industry standard key pairs out of the box?

Thoughts appreciated. :)



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.

You almost got it right. After step two and you’ve pasted the public key into authorized_keys, save the keys as the putty format. Putty can’t read openssh keys. The conversation option is only there in case you want to use that key later from a linux or other system that uses openssh. <br> <br>Alternatively instead of using putty you can use xshell which is free for home use (only paid if a business). A lot of windows users prefer it over putty. <br> <br>Hope this helps, cheers.

Hi. Thanks for the Sunday reply :). <br> <br>Right, just tried saving the private key from the PuTTy save dialog. Got a different error: “server refused our key”. Have restarted SSH daemon on droplet. <br> <br>Key looks like this <br> <br>PuTTY-User-Key-File-2: ssh-rsa <br>Encryption: none <br>Comment: rsa-key-20140601 <br>Public-Lines: 4 <br>AAAAB3NzaC1yc2EE/tSY2c=… etc <br>Private-Lines: 8 <br>AAAAgQC7WTuh6UCNbfRR1v5gYQZVQPB69+vG0tSf2acnyFtd75uweGGS/tAinS6a …etc <br>Private-MAC: 0069bc… etc <br> <br>Anything jump out? <br> <br>If nothing obvious is wrong with that structure, I’ll try it with xshell. <br>Cheers.

Just had a thought (oh no). This should be SSH1 right?

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.