Skip to content

Instantly share code, notes, and snippets.

@wilrnh
Created June 10, 2015 23:14
Show Gist options
  • Save wilrnh/e50e633e13a2b3b5f52d to your computer and use it in GitHub Desktop.
Save wilrnh/e50e633e13a2b3b5f52d to your computer and use it in GitHub Desktop.
GPG for n00bs

GPG for n00bs

Mac OS

# setup gpg
brew install gpg # alternatively, install GPGTools - https://gpgtools.org/
# import your friend's public key
gpg --recv-keys 55418814 --keyserver pgp.mit.edu
# encrypt your stuff
gpg --encrypt --output secretfile.txt.gpg --recipient 55418814 secretfile.txt
# mail it with love
echo -e "From: you@example.com\nTo: friend@example.com\nSubject: Heres your secret file bruh" | cat - secretfile.txt.gpg | sendmail -it
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment