1

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

Community
  • 1
  • 1
mllm
  • 17,068
  • 15
  • 53
  • 64

1 Answers1

1

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).

Community
  • 1
  • 1
mllm
  • 17,068
  • 15
  • 53
  • 64