jasonnixon.net - quick reference - gpg


examples generated with gpg (GnuPG) 1.4.9 on Linux

path to keyring files
/home/username/.gnupg/

gpg --list-keys
lists public keys on keyring

gpg --list-secret-keys
lists secret keys on keyring

gpg --armor --export mike@yahoo.com > pubkey.txt
export mike's public key in ASCII text to a file named pubkey.txt

gpg --import fredpk.txt
import fred's public key into my keyring (from file fredpk.txt)

gpg -e -r fred@gmail.com file.txt
encrypt file.txt using fred's public key (output file is file.txt.gpg)

gpg -e -u mike@yahoo.com -r fred@gmail.com file.txt
encrypt file.txt using fred's public key, but sign encrypted file with mike's secret key

gpg -d encryptedfile.gpg > cleartext.txt
decrypts encryptedfile.gpg with your private key to a file called cleartext.txt





Valid HTML 4.01 Transitional Valid CSS!