mllm
mllm

Reputation: 17458

Transferring public and private key on mac

How do I transfer both private / public keys from one mac to the other?

I know how to export the private key to .p12 with Keychain Access, and then when I double click it in the destination mac, it's added to Keychain Access. However, when I export the public key to .pem file, double clicking it in the destination mac just spits out:

An error has occurred. Unable to import an item. The contents of this item cannot be retrieved.

When I tried the solution of security import pub.pem -k login.keychain, it said 1 key imported., but it doesn't show on Keychain Access.

Thanks

Upvotes: 1

Views: 3112

Answers (1)

mllm
mllm

Reputation: 17458

According to this, it looks like when running the security import... command, it's added to the keychain with the generic name Imported Public Key.

Now you just need to rename it to the relevant one (e.g. like the private key name).

Upvotes: 1

Related Questions