LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 06-17-2014, 03:23 AM   #1
Amarildo
Member
 
Registered: Jun 2014
Posts: 176

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

Rep: Reputation: 451Reputation: 451Reputation: 451Reputation: 451Reputation: 451
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.
 
  


Reply


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 01:58 PM
GPG: Bad session key gpg between gpg on linux and gpg gui on windows XP konqi Linux - Software 1 07-21-2009 10:37 AM
ssh Key pair whoes Red Squirrel Linux - Security 2 08-17-2008 09:12 PM
How can I create an X509 .pfx certificate from an existing gpg key pair? stardotstar Linux - Security 0 11-15-2007 07:37 PM
GPG Data, Secret Key but no Public Key? Aeiri Linux - Software 5 07-20-2004 07:00 PM


All times are GMT -5. The time now is 04:23 AM.

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