GPG is a suite of tools for encrypting and signing messages and files. Working with it on the cli is fairly forward if you get behind it once and of course, it features completion on the command line.
NOTE: This is more of a personal cheatsheet which I think might be useful for other people as well.
Generate Key
$ gpg --gen-key
Generate Revocation Cert
$ gpg --gen-revoke
Export Public Keys
$ gpg --export --armor archy@archyslife.lan > archy.archyslife.lan.asc
Export Secret Keys
$ gpg --export-secret-keys --armor archy@archyslife.lan > archy.archyslife.lan.secret
Export Ownertrust
$ gpg --export-ownertrust > ownertrust.txt
Import Public Keys
$ gpg --import archy.archyslife.lan.asc
Import Secret Keys
$ gpg --import archy.archyslife.lan.secret
Import Ownertrust
$ gpg --import-ownertrust ownertrust.txt
Show fingerprint of a key
$ gpg --fingerprint archy@archyslife.lan
Upload a key to a keyserver
$ gpg --keyserver keys.gnupg.net --send-keys archy@archyslife.lan
Search for key on a keyserver
$ gpg --keyserver keys.gnupg.net --search archy@archyslife.lan
Revoke key
$ gpg --import revocation.asc archy@archyslife.lan
$ gpg --keyserver keys.gnupg.net --send-keys archy@archyslife.lan
Delete Key
$ gpg --delete-secret-keys archy@archyslife.lan
$ gpg --delete-keys archy@archyslife.lan
Feel free to comment and / or suggest a topic
Comments
Post a Comment