Trouble with SSH key pairs windows client

June 1, 2014 3.3k views
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. :)
4 Answers
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.

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.

Hope this helps, cheers.
Hi. Thanks for the Sunday reply :).

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.

Key looks like this

PuTTY-User-Key-File-2: ssh-rsa
Encryption: none
Comment: rsa-key-20140601
Public-Lines: 4
AAAAB3NzaC1yc2EE/tSY2c=.... etc
Private-Lines: 8
AAAAgQC7WTuh6UCNbfRR1v5gYQZVQPB69+vG0tSf2acnyFtd75uweGGS/tAinS6a .....etc
Private-MAC: 0069bc..... etc

Anything jump out?

If nothing obvious is wrong with that structure, I'll try it with xshell.
Just had a thought (oh no). This should be SSH1 right?
I had... er ... ahem .... created the .ssh folder in the wrong place. /.SSH instead of $HOME/.SSH...oh deary deary deary deary me. What a chump. Upside is I got to hear about Xshell :)

Thanks again!
Have another answer? Share your knowledge.