Latest LQ Deal: Linux Power User Bundle
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 06-17-2014, 02:23 AM   #1
Registered: Jun 2014
Posts: 176

Rep: Reputation: Disabled
How to backup my GPG Key pair?


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?
Old 06-17-2014, 08:11 PM   #2
Senior Member
Registered: Sep 2009
Location: Orange County, CA
Distribution: Kubuntu x64, Raspbian, CentOS
Posts: 1,849
Blog Entries: 36

Rep: Reputation: 455Reputation: 455Reputation: 455Reputation: 455Reputation: 455
You must use the gpg command.

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

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.
1 members found this post helpful.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
import openssh key pair HavocStyles Programming 0 01-14-2010 12:58 PM
GPG: Bad session key gpg between gpg on linux and gpg gui on windows XP konqi Linux - Software 1 07-21-2009 09:37 AM
ssh Key pair whoes Red Squirrel Linux - Security 2 08-17-2008 08:12 PM
How can I create an X509 .pfx certificate from an existing gpg key pair? stardotstar Linux - Security 0 11-15-2007 06:37 PM
GPG Data, Secret Key but no Public Key? Aeiri Linux - Software 5 07-20-2004 06:00 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:22 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration