gpg --gen-key
gpg -u {KEY_ID} --clearsign <file_name>
export the public and private keys and encrypt the pair:
gpg --output - --export-secret-key {KEY_ID} | cat <(gpg --output - --export {KEY_ID}) - | gpg --armor --output keys.asc --symmetric --cipher-algo AES256
move the file (keys.asc) to the other computer.
import the key on the other computer:
gpg --no-use-agent --output - keys.asc | gpg --import
shred the file for good measure:
shred -n 3 -u keys.asc
Thanks to Dark Otter
source: | http://montemazuma.wordpress.com/2010/03/01/moving-a-gpg-key-privately/ |
---|
gpg --output out.gpg --encrypt --recipient [email protected] input
Encrypt:
tar cfz - this/ | gpg --armor --output files.asc --symmetric --cipher-algo AES256
Decrypt:
gpg --no-use-agent --output - files.asc | tar xzf -