Reputation: 55
Attempting to download a new Key Pair as I am about to Launch a new Amazon EC2 Instance. When I click to download, here is what I am seeing in Keychain Access:
An error has occurred. Unable to import an item. The contents of this item cannot be retrieved.
Unsuccessful solution attempts include:
Running security import pub_key.pem -k ~/Library/Keychains/login.keychain
in terminal
Clicking to Lock and then Unlock Login in Keychain Accesss
rm ida_rsa.pub
, rm ida_rsa
, and all other old .pem
's in ~/.ssh
Upvotes: 0
Views: 1329
Reputation: 270039
It appears that you are experiencing a problem when opening the .pem
file that was downloaded to your computer.
This is because a .pem
file is not intended to be run. Rather, it is used by an ssh
command to access the instance. For example:
ssh -i keypair.pem [email protected]
The ssh
command uses the keypair, but the keypair itself is just a data file and is not intended to be 'opened'.
Some alternatives to using ssh
and keypairs are:
Upvotes: 1