Created
May 3, 2020 11:54
-
-
Save abel0b/aec5065a90b52a022aa92998466ac273 to your computer and use it in GitHub Desktop.
Cheatsheet encrypt stuff with gpg
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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