I have created an open-ssl private key which I would like to use to connect to my server through ssh. The openssl key was generated during certificate creation and I have to use this key on putty. The problem is that puttygen only allows openssh type keys to be converted to putty keys. How do I convert my open-ssl private key to openssh private key so I can convert it to putty key? The length of the private key is 2048 bits.

  • Why not just create a new OpenSSH key private key? – Stephen Kitt Feb 25 '16 at 17:46
  • Because I had to use openssl to create a self signed certificate which the server requires. In this process was the private key also generated. – The amateur programmer Feb 25 '16 at 17:47
  • But what does the self-signed certificate and its key have to do with SSH? – muru Feb 25 '16 at 17:50
  • Are you using certificate-based SSH authentication? (As described in the CERTIFICATES section of the ssh-keygen(1) manpage.) – Stephen Kitt Feb 25 '16 at 17:51
  • Have a look at ssh-keygen's -i and -m options, anyway. – muru Feb 25 '16 at 17:52

The RSA key formats look mighty similar to me.

bash-4.1$ openssl genrsa 4096 > whoble
bash-4.1$ ssh-keygen -t rsa -N '' -f bobble
bash-4.1$ head -c 123 whoble ; echo
bash-4.1$ head -c 123 bobble ; echo
  • 1
    They are not similar enought for puttygen to convert a key for use with putty. I have tried, but it tells me it doesn't recognize the format. Keys generated with ssh-keygen convert fine with puttygen. – The amateur programmer Feb 25 '16 at 18:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.