Last active
December 22, 2015 16:09
-
-
Save mwatts272/6497530 to your computer and use it in GitHub Desktop.
A collection of the most commonly used GnuPG Commands.
This file contains hidden or 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
########################### | |
##### Generating Keys ##### | |
########################### | |
## Generate a key. Follow the options and your good to go. Just make sure your on your Jack Jones! | |
gpg --gen-key | |
############################### | |
##### Importing your keys ##### | |
############################### | |
## Import a friends key. | |
gpg --import pete-public.asc | |
## Search for Pete's key on the public name server. | |
gpg --search-keys '[email protected]' --keyserver hkp://subkeys.pgp.net | |
############################### | |
##### Exporting your keys ##### | |
############################### | |
## Export your public key. | |
gpg --export -a 'Matthew Watts' > /tmp/public-main.key | |
## Export your private key. | |
gpg --export-secret-key -a "Matthew Watts" > /tmp/private-core.key | |
############################## | |
##### Deleting your keys ##### | |
############################## | |
## Delete your public key. | |
gpg --delete-key "Matthew Watts" | |
## Delete your private key. | |
gpg --delete-secret-key "Matthew Watts" | |
############################## | |
##### Remote key storage ##### | |
############################## | |
## Store your keys on the key server. | |
gpg --send-keys 'Matthew Watts' --keyserver hkp://subkeys.pgp.net | |
############################ | |
##### Encrypting Files ##### | |
############################ | |
## Encrypt a file. | |
gpg --encrypt --recipient 'Matthew Watts' /tmp/abovetopsecret.txt | |
## Encrypt a file with a symmetric cipher. | |
gpg --output /tmp/abovetopsecret.txt.gpg --symmetric /tmp/abovetopsecret.txt | |
############################ | |
##### Decrypting Files ##### | |
############################ | |
## Decrypt a file. | |
gpg --output /tmp/abovetopsecret.decrytped.txt --decrypt /tmp/abovetopsecret.txt.gpg | |
################################ | |
##### Verification Process ##### | |
################################ | |
## Verify a file for authenticity. | |
gpg --verify abovetopsecret.txt.gpg.asc abovetopsecret.txt.gpg | |
## Sign a file for verification. | |
gpg --armor --detach-sign your-file.zip |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment