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 78 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: Install Homebrew, then run brew install putty

Place your keys in some directory, e.g. your home folder. Now convert the PPK keys to SSH keypairs:

cd ~
puttygen id_dsa.ppk -O private-openssh -o id_dsa

for the private key, and

puttygen id_dsa.ppk -O public-openssh -o id_dsa.pub

or the public key. Move these keys to ~/.ssh and make sure the permissions are set to private for your private key:

mkdir -p ~/.ssh
mv -i ~/id_dsa ~/.ssh
mv -i ~/id_dsa.pub ~/.ssh
chmod 600 ~/.ssh id_dsa
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
.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


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.