Saturday, July 09, 2011

Convert SSH keys from OpenSSH to SSH2 and back

If you need to access machines running a different SSH implementation, say OpenSSH to SSH2, you can convert your key to enable passphrase-less logins. The following commands allow you to convert keys from from OpenSSH to SSH2 as well as from SSH2 to OpenSSH.

Convert OpenSSH to SSH2

ssh-keygen -e -f id_rsa.pub > id_rsa_ssh2.pub

Convert SSH2 to OpenSSH

ssh-keygen -i -f id_rsa_1024_a.pub > id_rsa_1024_a_openssh.pub

No comments: