7

Possible Duplicate:
How to share one pgp-key on multiple machines?

I am about to upgrade my computer to 11.04. But before I do I want to backup my PGP key that I use for signing my ubuntu .deb packages. So that if something goes wrong in the upgrade I don't lose it.

How to I go about backing up my pgp key?

trampster
  • 11,792

1 Answers1

9

From Ubuntu's GPG Howto:

Backing up your public key

  1. List your public keys:

    gpg --list-keys
    
  2. Look for the line that starts something like "pub 1024D/". The part after the 1024D is the key-id. To export the key:

    gpg -ao _something_-public.key --export key-id
    

Backing up your private key

  1. List your private keys:

    gpg --list-secret-keys
    
  2. Look for the line that starts something like "sec 1024D/". The part after the 1024D is the key-id. To export the private key:

    gpg -ao _something_-private.key --export-secret-keys key-id
    

How to restore is also listed there.

igi
  • 3,197