I've converted an rsa key to pem using the following command
openssl rsa -in ~/.ssh/id_rsa -outform pem > id_rsa.pemHowever when I try uploading this key to my ubuntu server hosted on Azure I get an error
The certificate is in an invalid format. X.509 standard format in a .cer or .pem file is supported.What is the correct way of converting an rsa key to pem format?
51 Answer
From the Azure site itself:
openssl req -x509 -key ~/.ssh/id_rsa -nodes -days 365 -newkey rsa:2048 -out id_rsa.pemThis will convert your private key into a public key that can be used with Azure.