SSH keys between and openssh’s clients

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 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-keygen -t dsa

The keys will be located in the folder .ssh/ on a OpenSSH machine and in .ssh2/ on a machine running

Converting the keys
Converting both from and to’s needs to be done on the machine running OpenSSH since this is only possible in ssh-keygen from OpenSSH.

  • From OpenSSH to ( is a OpenSSH key)
    tjansson@dirac:~/.ssh$ssh-keygen -e -f >
  • From to OpenSSH ( is a key)
    tjansson@dirac:~/.ssh$ ssh-keygen -i -f >

Connect to a machine from OpenSSH using keys
Assume that we have just converted a OpenSSH key and wish to use it on a machine. First we need to transfer the key,, to the machine.

tjansson@dirac:~/.ssh$scp solarismachine.foobar:.ssh2/

Afterwards we need to tell the client to use this key by adding a line to thee file ~/.ssh2/authorization. This file is located on the machine running and is maybe not existing. The should read:


Every time a new key is uploaded a line like this must be inserted in to ~/.ssh2/authorization.

Connect to a OpenSSH machine from using keys.
Since we already have converted the keys on the machine running OpenSSH the keys is already existing as, so all we need to do is to tell the OpenSSH client that we wish to use this key. This is done by appending the key into the file authorized_keys.

tjansson@dirac:~/.ssh$ cat >> authorized_keys

Finally we need to tell the client to use the the keys as well. This is done by adding a line to the file ~/.ssh2/identification on the machine running

IdKey id_dsa_2048_a

Only registered users can comment.

Leave a Reply