I created a key pair using ssh-keygen and get the two clasic id_rsa and id_rsa.pub.
I imported the public key into my AWS EC2 account.
Now I created a windows instance and to decrypt that instance password, AWS console is asking me for a .pem file. How I can get that .pem file from my two id_rsa and id_rsa.pub files?
According to this, this command can be used:
ssh-keygen -f id_rsa -e -m pem
This will convert your public key to an OpenSSL compatible format. Your private key is already in PEM format and can be used as is (as Michael Hampton stated).
Double check if AWS isn't asking for a (X.509) certificate in PEM format, which would be a different thing than your SSH keys.
id_rsa
contains the keypair, not just the private key. — Jul 30, 2020 at 07:41 Local articles referenced by this article: