2

I am using gpg and generated, imported and signed keys.

How can I take all of the work that I have done and export all of my keys then import them into another machine?

Daniel
  • 1,445

3 Answers3

5

Easy:

  gpg --export my_key -o my_public_key.gpg
  gpg --export-secret-key my_key -o my_secret_key.gpg

Then:

  gpg --import my_public_key.gpg
  gpg --allow-secret-key-import --import my_secret_key.gpg
Satanicpuppy
  • 7,027
3

Traditional PGP let you just copy the keyring files around, or just merge them by invoking it on the keyring to import. I've not kept up with GPG, but I'd be surprised if it differed significantly.

Actually, if you were being properly paranoid, the private keyring should live on a thumbdrive or similar removable device, with perhaps a securely stored CD-R or similar for backup), so that part would be moot.

0

You can just copy pubring.gpg, secring.gpg and trust.db from the old machine to the new one.

  • secring.gpg contains all your private keys
  • pubring.gpg contains all your public keys (imported, signed keys)
  • trust.db contains yout user trust settings (if used)

HTH, Jan

Jan
  • 191