Working with GnuPG
GnuPG, the GNU Privacy Guard is a complete implementation of the OpenPGP standard. It allows you to generate and manage your own GnuPG key, and is tightly integrated to many e-mail clients, libraries, and many other applications.
Ubuntu 18.04 includes both
The following command will guide you though the process of creating a new key:
Follow the instructions and set a limited duration for the new key, for example one or two years. And remember the password!
You can find the keys corresponding to your colleagues with this command:
gpg2 --search email@address`
Once found, use the
gpg2 --recv-keys ABCDEF01 command to add it to your keychain.
You should export your key and store it safely, for example in your password manager.
List your keys:
$ gpg2 --list-keys
Export your keys as follows:
$ gpg2 --output mygpgkey_pub.gpg --armor --export ABCDFE01 $ gpg2 --output mygpgkey_sec.gpg --armor --export-secret-key ABCDFE01
This also works:
$ gpg2 --armor --export firstname.lastname@example.org > mykey.asc
|The resulting file can be safely imported into other applications, for example ProtonMail or GitLab.|