Advertisement
GTAXL

PGP Cheatsheet

Dec 13th, 2017
1,018
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.91 KB | None | 0 0
  1. Cheat sheet, Linux commands:
  2. Encrypt file or e-mail:
  3. gpg -e -r your@email.com filename
  4. -e Tells gpg to encrypt a file with PGP
  5. -a (--armor) ASCII plaintext, used for e-mails
  6. -r Recipient, who you want to encrypt the file for, this can be for yourself or someone else
  7.  
  8. Decrypt e-mail or file:
  9. gpg -d filename
  10. -d Tells gpg to decrypt the file, you must have the private key on said server's keyring to decrypt said file
  11. -o specify output file name, otherwise spit out the file in stdout.
  12.  
  13. List public keys:
  14. gpg --list-keys
  15.  
  16. List private keys:
  17. gpg --list-secret-keys
  18.  
  19. Import public key:
  20. gpg --import key.asc
  21.  
  22. Import private key:
  23. gpg --allow-secret-key-import --import
  24.  
  25. Export public key:
  26. gpg -a --export your@email.com
  27.  
  28.  
  29. Export private key:
  30. gpg -a --export-secret-keys your@email.com
  31.  
  32. Delete public key:
  33. gpg --delete-key your@email.com
  34.  
  35. Delete private key:
  36. gpg --delete-secret-key your@email.com
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement