So I'm trying to set up an EC2 instance on AWS and I've created a key pair and downloaded the .pem file. However, when I try to open it I get the error message:
I've also read about entering the following in the terminal to work around the issue:
security import pub_key.pem -k ~/Library/Keychains/login.keychain
but this doesn't work either (I get the following error message:
security: Error reading infile pub_key.pem: No such file or directory).
I've also tried just creating new key pairs but the problem persists.
macOS. The same concept is true for your Mac email client as it is for a Windows one: use Safari to have the PEM file imported into Keychain Access. You can also import SSL certificates through the File > Import Items menu in Keychain Access. Choose System from the drop-down menu and then follow the on-screen prompts.
If you cannot open your PEM file correctly, try to right-click or long-press the file. Then click "Open with" and choose an application. You can also display a PEM file directly in the browser: Just drag the file onto this browser window and drop it.
The keychain extension changed with Sierra. Now it is login.keychain-db
. You should navigate to where the pem key file is and use
security import pub_key.pem -k ~/Library/Keychains/login.keychain-db
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With