Posted about 2 years ago. Visible to the public.

How to encrypt and decrypt GPG mails in the terminal


gpg -e -a -r <receiver@email.address> [-r <receiver2@email.address>] <type message> <ctrl d>

Now copy the PGP message to your mail client and send that mail.

  • You need one -r flag per receiver address
  • With a single receiver, you can also write gpg -ear reci@pie.nt


gpg -d <paste encrypted message> <ctrl d>

Adding public keys

gpg --keyserver --search-keys <> <number of the search result that should be imported>

Also see Using GPG/PGP with Ubuntu and Thunderbird.

Your development team has a full backlog of feature requests, chores and refactoring coupled with deadlines? We are familiar with that. With our "DevOps as a Service" offering, we support developer teams with infrastructure and operations expertise.

Owner of this card:

Dominik Schöler
Last edit:
7 months ago
by Simon Hofmann
command, line, pgp
About this deck:
We are makandra and do test-driven, agile Ruby on Rails software development.
License for source code
Posted by Dominik Schöler to makandra orga
This website uses short-lived cookies to improve usability.
Accept or learn more