GPG Keys. Send file to multiple recipients.

GEEKS!!

If you remember your RHCE Training or RHCSS (RH333) Training you must be remembering how to use the GPG keys to encrypt and decrypt the files and send it to other recipients without being bothered about sharing the “password”.

Now here is a very small trick.

If you want to send one file to multiple recipients using GPG you can either execute the command –

gpg –encrypt –recipient nameofperson filename

multiple times and by replacing the nameofperson each time.

Other smart way can be that you can use a slightly smart version of GPG command –

gpg -r firstperson -r secondperson -r thirdperson –encrypt filename

In the second case, GPG will gpg will use the public key of all the recipients to encrypt the data and any one of their private keys can decrypt the data.

You just need to make sure that you have “imported” all the persons GPG keys before executing this command.