Stack Exchange Network
Stack Exchange network consists of 181 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Visit Stack Exchange
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It only takes a minute to sign up.
Sign up to join this community
Anybody can ask a question
The best answers are voted up and rise to the top
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?
asked May 28, 2011 at 10:23
11k77 gold badges3535 silver badges5151 bronze badges
From Ubuntu's GPG Howto:
Backing up your public key
List your public keys:
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
List your private keys:
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.
answered May 28, 2011 at 10:54
2,14522 gold badges1818 silver badges3131 bronze badges