how to convert a putty ssh key to openssh format on linux

in a nutshell: use puttygen on either win or un*x, and ssh-keygen.

  • on debian derivatives, putty can be installed with: apt-get install putty-tools

  • on centos (other redhat descendants?): yum --enablerepo rpmforge install putty

  • convert putty private key to openssh private key: puttygen mykey.ppk -O private-openssh -o mykey

  • convert putty private key to openssh public key: puttygen -L mykey.ppk >mykey.pub

  • or, using ssh-keygen: ssh-keygen -i mykey > mykey.pub