Linux gpg

From John Freier
Revision as of 15:46, 12 June 2018 by Jfreier (Talk | contribs) (Created page with " == Import Public/Private Key == It doesn't make a difference if its a private key or public key, this is the correct way to import a key. gpg --import file.gpg == Export P...")

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Import Public/Private Key

It doesn't make a difference if its a private key or public key, this is the correct way to import a key.

 gpg --import file.gpg

Export Public Key

This is the command to export your public key, using the armor command will convert the key from binary to ascii, so you can email it or post it.

 gpg --armor --export you@example.com > mykey.asc

Another way

 gpg --output mykey_pub.gpg --armor --export me@email.com

If you have more then one key another way where ABAACA is the hash.

 gpg --output mykey_pub.gpg --armor --export ABAACA

Export Private Key

To export your private key.

 gpg --output mykey_sec.gpg --armor --export-secret-key me@email.com

another way, where ABAACA is the hash

 gpg --output mykey_sec.gpg --armor --export-secret-key ABAACA