You can still get it using the -m PEM option, and you can also get the PKCS#8 format using -m PKCS8. The ssh-keygen command used to output RSA private keys in the OpenSSL-style PEM or "bare RSA" or PKCS#1 format, but that's no longer the default. But that's where the similarities end – the actual data structure found within that Base64 blob is completely different than that of PEM it isn't even using ASN.1 DER like typical "PEM" files do, but uses the SSH data format instead. There's a "-HEADER-" and there's Base64-encoded data. So why the pem generated by ssh-keygen is rejected? Both files are PEM format, both when viewed using cat show the same format. BEGIN RSA PRIVATE KEY- MIIEogIBAAKCAQEAuc3m0tXo8UQvF8CJi9Cy7580WxfKvFHYZ3F06Uh19s9c51R/ Line:/AppleInternal/BuildRoot/Library/Caches//Sources/libressl/libressl-47.140.1/libressl-2.8/crypto/pem/pem_lib.c:684:Expecting:Īfter the comment from I created a private key using openssl as follows: $ openssl genrsa -out anotherkey.key 2048 Unable to load Private Key 4506685036:error:09FFF06C:PEM BEGIN OPENSSH PRIVATE KEY- b3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAAAAAAAAABAAACFwAAAAdzc2gtcnīut when I run the following command: $ openssl rsa -in my-trusted-key -text -inform PEM -noout I can open the private key file and I see: I have created a public/private key pair with this command: ssh-keygen -t rsa -b 4096 -f my-trusted-key -C "Just a public/private key"
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |