Encrypting a file to multiple recipients

David Shaw dshaw at jabberwocky.com
Mon Jan 3 16:26:56 CET 2005


On Thu, Dec 30, 2004 at 02:26:38PM -0200, Mazzer Cassio-ACM125 wrote:
> Hi,
> 
> I'm trying to encrypt a file using a list of recipients.
> 
> For instance, I have a file called test.txt and I want to encrypt this file to send to multiple recipients (recipient_01 and recipient_02).
> 
> I'm using the following command line (I have tested and it works):
> 
> gpg --yes -r "recipient_01" -r "recipient_02" -e test.txt -o test_encrypted.txt.gpg.
> 
> This command works fine. 
> 
> However, I'd like to know if I really have to repeat the "-r" before each recipient or if there is a way of executing this command typing something like 
> gpg --yes -r--list-recipients "recipient_01" "recipient_02" -e test.txt 

You need to put a '-r' before every recipient.  However, if you
frequently use the same list of recipients, you can stick something
like this into your gpg.conf file:

  group my_list_of_people = recipient_01 recipient_02

Then you can use '-r my_list_of_people' and get both recipients in one
shot.

David



More information about the Gnupg-users mailing list