LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How to backup my GPG Key pair? (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-backup-my-gpg-key-pair-4175508229/)

Amarildo 06-17-2014 02:23 AM

How to backup my GPG Key pair?
 
Hello,

I recently created a key-pair with GnuPG to sign e-Mails and encrypt files. My public key was uploaded to the gnupg server and I made a backup of my private one (backup-private.asc).

From time to time I fill my main drive with zeros and my concern is that if I only copy my ~/.gnupg/ folder I won't be able to use my keys once the system is reinstalled.

What is the proper way to backup everything in order to be able to use my keys after a system re-install?

sag47 06-17-2014 08:11 PM

You must use the gpg command.

You can use the following to create portable public secret key pair.

Code:

gpg --export --armor [key] > my_gpg_pub-sec.asc
gpg --export-secret-keys --armor [key] >> my_gpg_pub-sec.asc

See man gpg for more information. The pub-sec ascii key file can be imported into gpg or other programs that are gpg compatible.


All times are GMT -5. The time now is 05:14 AM.