Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I know that is possible to convert .ppk under puttygen in Windows, but how to do that on Linux ? Is this possible ?

share|improve this question
add comment

2 Answers

up vote 73 down vote accepted

Do it with Putty. :)

  • Linux: with your package manager look for the putty alternative:

    • Debian like apt-cache search putty
    • RPM based yum list putty
    • Gentoo emerge --search putty
    • etc.
  • OS X: brew install putty

puttygen id_dsa.ppk -O private-openssh -o id_dsa for the private key

puttygen id_dsa.ppk -O public-openssh -o id_dsa.pub for the public key

share|improve this answer
add comment
ssh-keygen -i -f id_dsa_1024_a.pub > id_dsa_1024_a_openssh.pub
  • -i flag is import from other than openssh format
  • -f flag means read from input file

source: http://burnz.wordpress.com/2007/12/14/ssh-convert-openssh-to-ssh2-and-vise-versa/

share|improve this answer
    
+1 — no need for any additional software –  mogsie Nov 27 '12 at 9:52
3  
.ppk files are the full key pairs, I don't think the command above or the blog post apply to that. –  Peter Becker Feb 7 '13 at 0:27
    
I think I meant that it works if you use puttygen's "Save public key" button. ssh-keygen do not understand true .ppk files because they lack those '---- BEGIN SSH2 PUBLIC KEY ----' markers. You can find the public key in the .ppk file between lines "Public-Lines:.." and "Private-Lines:.." though. –  jous Jan 7 at 14:35
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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