Skip to content

Instantly share code, notes, and snippets.

@abel0b
Created May 3, 2020 11:54
Show Gist options
  • Save abel0b/aec5065a90b52a022aa92998466ac273 to your computer and use it in GitHub Desktop.
Save abel0b/aec5065a90b52a022aa92998466ac273 to your computer and use it in GitHub Desktop.
Cheatsheet encrypt stuff with gpg
# man gpg
# configuration in ~/.gnupg
# generate gpg keypair with default options
gpg --gen-key
# or use dialog
gpg --full-generate-key
# import a key
gpg --import-key alice.key
# search a key on mit key server
gpg --keyserver pgp.mit.edu --search-keys alice@example.org
# export my key
gpg --output bob.key --armor --export bob@example.org
# encrypt a file
gpg --encrypt --recipent alice@example.org attack-plan.txt
# decrypt a file
gpg --decrypt attack-plan.txt.gpg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment