Skip to main content
Support

KB Article #44041

How to generate RSA or DSS key with openssh compatibles with Gateway?

Problem

-- How to generate RSA or DSS key with openssh compatibles with Gateway?


Resolution

1. generate a pair of key (private and public) using the following command line:
>ssh-keygen -t rsa -b 1024
-t Type of the key rsa or dsa (dss)
-b Number of bits in the key to create 1024 (128 ) 2048 (256)



* Here an example of creation:
Generating public/private rsa key pair.
Enter file in which to save the key (/cygdrive/c/.ssh/id_rsa): SSH-CLE
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in SSH-CLE.
Your public key has been saved in SSH-CLE.pub.
The key fingerprint is:
8c:8e:46:2b:cf:23:be:c4:6e:31:30:1b:38:f4:c8:77 rSerres@ITEM-51359



* Be Careful, you mustn't indicate a pass phrase, because it's an addon of openssh and it's not recognized by Gateway.



2. Now the private key SSH-CLE could be imported in Gateway with the pem importation format.
However the public key is in OpenSSH format so, it has to be converted into pem format.



3. To convert the public key use the following command line:
>ssh-keygen -e -f SSH-CLE.pub > SSH-CLE.pem



4. The public key is now in pem format but it contains a comment line which it's not recognized by Gateway. Edit public key file in a text editor and delete this line.



---- BEGIN SSH2 PUBLIC KEY ----
Comment: "1024-bit RSA, converted from OpenSSH by rSerres@ITEM-51359"  [ /!\ line to delete ]
AAAAB3NzaC1yc2EAAAABIwAAAIEAu8oHLqLryumKgqCmBexOV538WPZqcpl4wdgci4JvRF
...



5. Now the public key could be imported into Gateway with the pem format.