When i try to convert SSH2 RSA format based private key to .pem format, using openssl i am getting the below error.[jbadmin@xxxxxxx .ssh2]$ openssl req -x509 -key /home/jbadmin/.ssh2/id_rsa_2048_a -nodes -days 365 -newkey rsa:2048 -out id_rsa_2048_a.pemunable to load Private Key139994671441736:error:0906D06C:PEM routines:PEM_read_bio:no start line:pem_lib.c:703:Expecting: ANY PRIVATE KEYMy Private Key:[jbadmin@xxxxxx.ssh2]$ cat id_rsa_2048_a---- BEGIN SSH2 ENCRYPTED PRIVATE KEY ----Subject: jbadminComment: 2048-bit rsa, jbadmin@x01bicallapp1a, Tue Dec 29 2015 11:38:\------------------------------------------------------------ END SSH2 ENCRYPTED PRIVATE KEY ----Please suggest me if there is any other way of doing it using openssl or ssh-keygen-g3EDIT1: Tried below option, still same issue[jbadmin@x01bicallapp1a .ssh2]$ openssl rsa -outform PEM -in /home/jbadmin/.ssh2/id_rsa_2048_a -out /home/jbadmin/.ssh2/id_rsa_2048_a.pemunable to load Private Key140493432293192:error:0906D06C:PEM routines:PEM_read_bio:no start line:pem_lib.c:703:Expecting: ANY PRIVATE KEY
Converting SSH2 RSA Private Key to .pem using openssl
openssl;ssh keygen
Solution: I used the below command to get it worked$ ssh-keygen-g3 --key-format openssh2  --import-private-key /home/jbadmin/.ssh2/id_rsa_2048_a /home/jbadmin/.ssh2/id_rsa_2048_a_openssh.pemImported private key in /home/jbadmin/.ssh2/id_rsa_2048_a to /home/jbadmin/.ssh2/id_rsa_2048_a_openssh.pem.