10 августа, 2015

Backup your PGP key

List keys:

alex0007@alex0007:~$ gpg --list-keys
 
/home/alex0007/.gnupg/pubring.gpg
---------------------------------
pub   2048R/886DDD89 2009-09-04 [expires: 2020-08-29]
uid                  deb.torproject.org archive signing key
sub   2048R/219EC810 2009-09-04 [expires: 2018-08-30]

pub   4096R/C50F5200 2015-05-01
uid                  Alex0007 <i@alex0007.ru>
uid                  Alex0007 <Alex0007lolpvp@gmail.com>
sub   4096R/38D882A8 2015-05-01


Export:
gpg --export-secret-keys -a C50F5200 > Alex0007key.asc

Import:
gpg --allow-secret-key-import --import '/home/alex0007/Alex0007key.asc