Password on command line?
Daniel Carrera
dcarrera@math.toronto.edu
Tue Aug 6 04:06:02 2002
echo "my secret passphrase" | gpg --passphrase-fd 0 ...
On Sun, 4 Aug 2002, Frank Hrebabetzky wrote:
> Hi there,
>
> I work occationally on some text files ciphered symmetrically, which
> involves the following steps:
> gpg -decrypt <file> > <file>.txt # get clear text
> pico <file>.txt # edit it
> gpg -co <file> <file>.txt # cipher symmetric.
> wipe <file>.txt # erase clear text
> So I wrote a script for that, but I have to type in 3 times the same
> passphrase: for deciphering, ciphering and confirmation.
>
> Passing the passphrase as command line parameter would solve the problem,
> because the script could read it and pass it to gpg, but according to the
> man pages such a gpg option doesn't exist. The option --passphrase-fd gave
> me some hope first, because I thought I could write the passphrase in a
> file first and wipe it out at the end, but my linux book only told me
> about the standard file descriptors 0, 1 and 2, which don't help me.
>
> Any suggestion?
>
> -------------------------------------------------
> Frank Hrebabetzky Tel.: +55 / 48 / 9998 7686
> Florianopolis email: frankh@terra.com.br
> Brazil
>
>
> _______________________________________________
> Gnupg-users mailing list
> Gnupg-users@gnupg.org
> http://lists.gnupg.org/mailman/listinfo/gnupg-users
>