I am attempting to create a public/private key pair using ssh-keygen. I need the key to be in PKCS1 format so that it states "BEING RSA PRIVATE KEY". No matter what I try it appears to only create in PKCS8 format. Any thoughts on what the issue could be?
I am running the following command:
ssh-keygen -m PEM -t rsa -b 2048
From my understanding specifying the -m PEM format should create it in PKCS1 format. I am expecting the header of the key to state
-----BEGIN RSA PRIVATE KEY-----
but instead it states
-----BEGIN PRIVATE KEY-----
This leads me to believe it is in PKCS8 format. Any thoughts on how to fix this? I am using openssh version 7.4p1.
Stop using the option
-m PEM
. Just generate the key normally.Make sure your
ssh-keygen
supports-m
and try using lowercase format value, e.g.-m pem
.For example,