Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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?

share|improve this question

migrated from stackoverflow.com Oct 13 '09 at 15:53

This question came from our site for professional and enthusiast programmers.

3 Answers 3

up vote 5 down vote accepted

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
share|improve this answer
    
I am going to try this sometime this week! Thanks satanicpuppy! –  Daniel Oct 19 '09 at 22:05
    
The options used: -o, --output use as output file –  Daniel Oct 28 '09 at 23:28

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

share|improve this answer

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.