I have two machines I wish to work between using ssh and public keys. One machine is running Solaris 8 with SSH from the comercial ssh.com and the other machine is a a newly installed Linux machine running OpenSSH. The problem is that they have different key types and these keys needs to be converted.
For those who are not familiar with SSH keys such can be created by running the command (goes for both OpenSSH and ssh.com):
ssh-keygen -t dsa
The keys will be located in the folder .ssh/ on a OpenSSH machine and in .ssh2/ on a machine running ssh.com.
Converting the keys
Converting both from and to ssh.com’s needs to be done on the machine running OpenSSH since this is only possible in ssh-keygen from OpenSSH.
- From OpenSSH to ssh.com (id_dsa.pub is a OpenSSH key)
tjansson@dirac:~/.ssh$ssh-keygen -e -f id_dsa.pub > id_dsa_sshcom.pub
- From ssh.com to OpenSSH (id_dsa_2048_a.pub is a ssh.com key)
tjansson@dirac:~/.ssh$ ssh-keygen -i -f id_dsa_2048_a.pub > id_dsa_openssh.pub