gpg command line
First create a key:
gpg --gen-key
For generation I use the default of RSA and RSA, and I use 4096 bits, and i usually let the keys live for 1y.
Create a Revocation Certificate so you can Revoke you key on a keyserver
gpg --gen-revoke --armor --output=GPGRevocationCertificate.asc your@email.address
Create your ASCII public key so other people can encrypt to you.
gpg --armor --output pubkey.txt --export 'Your Name'
Post it to a key server
gpg --send-keys 'Your Name' --keyserver http://pgp..mit.edu
To encrypt you need to add your self as a recipiant.
gpg --encrypt --recipient 'Your Name' secret.txt
To decrypt a file.
gpg --output secret.txt --decrypt secret.txt.gpg
If you want to add a user to your keyring.
gpg --import key.asc
You may also like
Denyhosts on CentOS
October 18, 2016
Ubuntu SNMP config for Zabbix and Checkpoint
February 4, 2016
Build bitcoind from source Fedora 22
October 30, 2015
Archives
Calendar
| M | T | W | T | F | S | S |
|---|---|---|---|---|---|---|
| 1 | ||||||
| 2 | 3 | 4 | 5 | 6 | 7 | 8 |
| 9 | 10 | 11 | 12 | 13 | 14 | 15 |
| 16 | 17 | 18 | 19 | 20 | 21 | 22 |
| 23 | 24 | 25 | 26 | 27 | 28 | 29 |
| 30 | 31 | |||||
Leave a Reply