[Info] Exporting and Importing gpg public and private keys

Private keys:

gpg --list-secret-keys

gpg --export-secret-keys --armor --output exported_priv.keys

gpg --import exported_priv.keys

 

Public keys:

gpg --list-keys

gpg --export --output exported_pub.keys --armor

gpg --import exported_pub.keys

 

 

Setting trusted keys - After the keys have been imported to the new machine, they may become un-trusted. So you need to mark them as trusted on the new machine.

 autouser@ged-qrd-to1:~$ gpg --edit-key my_key

gpg (GnuPG) 1.4.16; Copyright (C) 2013 Free Software Foundation, Inc.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

pub 1024D/D0E9E90D created: 2013-02-14 expires: never usage: SCA
trust: unknown validity: unknown
sub 2048g/FCFA993A created: 2013-02-14 expires: never usage: E
[ unknown] (1). my_key <my@email.com>

gpg> trust
pub 1024D/D0E9E90D created: 2013-02-14 expires: never usage: SCA
trust: unknown validity: unknown
sub 2048g/FCFA993A created: 2013-02-14 expires: never usage: E
[ unknown] (1). my_key <my@email.com>

Please decide how far you trust this user to correctly verify other users’ keys
(by looking at passports, checking fingerprints from different sources, etc.)

1 = I don’t know or won’t say
2 = I do NOT trust
3 = I trust marginally
4 = I trust fully
5 = I trust ultimately
m = back to the main menu

Your decision? 5
Do you really want to set this key to ultimate trust? (y/N) y

pub 1024D/D0E9E90D created: 2013-02-14 expires: never usage: SCA
trust: ultimate validity: unknown
sub 2048g/FCFA993A created: 2013-02-14 expires: never usage: E
[ unknown] (1). my_key <my@email.com>
Please note that the shown key validity is not necessarily correct
unless you restart the program.

gpg> save
Key not changed so no update needed.
autouser@ged-qrd-to1:~$

 

Source:

http://www.apache.org/dev/openpgp.html

Attached Files
There are no attachments for this article.
Comments
There are no comments for this article. Be the first to post a comment.
Name
Email
Security Code Security Code
Related Articles RSS Feed
[Issue] SSH session slow to start
Viewed 1209 times since Tue, Sep 23, 2014
[How To] Remove a disk from a LVM volume group
Viewed 2434 times since Thu, May 4, 2017
MENU