Last active
December 19, 2018 03:42
-
-
Save SanCoder-Q/13c8eccd9908cf11912cc9e98d3b9f0b to your computer and use it in GitHub Desktop.
Using gpg to transfer file in a secure way
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
# install GnuPG | |
brew install gpg | |
# generate gpg key pair | |
gpg --gen-key | |
# list keys | |
gpg --list-keys | |
# export public key | |
gpg --armor --export <pubuid> > public.key | |
# import public key | |
gpg --import public.key | |
# encrypt file | |
gpg --output <file.enc> --encrypt --recipient <key recipient name / email> <file> | |
# decrypt file | |
gpg --decrypt --output <file> <file.enc> | |
# remove key | |
gpg --delete-key <key recipient name / email> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment