encrypting and signing a file without a passphrase

Thomas Arend Thomas.Arend@t-online.de
Mon Feb 10 18:15:02 2003


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Am Sonntag, 9. Februar 2003 18:07 schrieb Steve Kwong:
> Hi all,
>
> I am using version 1.2.1.  Can someone help me with the following:
>
> I would like to send encrpyt and sign a file without having to enter a
> passphrase each time.  I could not find a way to pass the passphrase as=
 an
> argument to GPG.   In the FAQ, there was some mention (article 4.14) ab=
out
> a batch process and removing the passphrase using --edit.  I tried that=
,
> but when I entered:
>     gpg --edit foo
>
>  I had no means of editing foo.
>
> Any ideas how I can encrpyt and sign a file without having to enter my
> passphrase?

You can provide your passphrase via file descriptor 0 to gpg.

echo your-passphrase | gpg --passphrase-fd=3D0 -ase -r recepients-id test=
=2Etxt

If you use this in a script your passphrase is accessable to everybody wh=
o an=20
read your script.

Best regards

=20
Thomas Arend

>
> Steve
> stevek@intergate.bc.ca
>
>
> _______________________________________________
> Gnupg-users mailing list
> Gnupg-users@gnupg.org
> http://lists.gnupg.org/mailman/listinfo/gnupg-users
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)

iD8DBQE+R95f2TqsmTFMxwkRAtsNAJ4/BIkvRzTv1wCuv+3eTs6qlwZCuACfU/U/
6vSP1FQ7FMaGwhjpN77kJr8=3D
=3Dm8nD
-----END PGP SIGNATURE-----