you also may be interested in echo "vendors public key" | gpg --import and maybe even gpg --export -a your-user-name I suppose that you also might want to check into echo "ciphertext" | gpg --decrypt if you start the command with a space it wont be saved in history for some shells, you can also end the commands with && history -c (ie: gpg --export -a your-user-name && history -c) but that clears entire command history edit: oh yeah you probably also will need gpg --gen-key pretty much, fuck GUIs, the following commands are all you need: echo "message" | gpg -a -e && history -c to encrypt messages echo "ciphertext" | gpg --decrypt to decrypt messages echo "vendors public key" | gpg --import to import keys gpg --export -a your-user-name to export keys and gpg --gen-key to generate keys