Sign your eMails with PGP
Generate a GPG keypair:
gpg --gen-key
You will be prompted for some info:
Please select what kind of key you want: 1
What keysize do you want? 4096
Key is valid for? 0
Is this correct? Y
Real name: Test Example
Email address: test@example.net
Change (N)ame, (C)omment, (E)mail or (O)kay/(Q)uit? O
Enter passphrase: v3ry5tr0ngPA55Phrase
Repeat passphrase: v3ry5tr0ngPA55Phrase
List all keys:
gpg --list-keys
gpg --list-keys --keyid-format LONG --fingerprint
/home/test/.gnupg/pubring.gpg
-----------------------------
pub 2048R/3498BB12 2019-06-06
uid Test Example <test@example.net>
sub 2048R/12C76133 2019-06-06
Export and send your public key as a file to the recipient (for sender):
gpg --armor --output test.example.net.gpg --export test@example.net
Import public key on recipient side (for recipient):
gpg --import test.example.net.gpg
Create the message (for sender):
cat << EOF > message.txt
Hello John Doe,
Your new id is 3ac8fad3ddfbd92accb47314f240f141.
Best Regards,
Linux Master Club
EOF
Signing the message (for sender):
cat message.txt | gpg --batch -u info@msgbr.de --passphrase info2019 -o - --clearsign -