Password for keyring

John Clizbe John at Mozilla-Enigmail.org
Wed Nov 10 20:45:33 CET 2010


Mohan Radhakrishnan wrote:
> Hi,
> 
>           Is there a way to pass a password from the command-line when
> using the ‘gpg’ command to encrypt files ?

You only need a passphrase when signing or decrypting unless your using
symmetric encryption.

The man page documents the following options:

       --passphrase-fd n
                 Read  the  passphrase from file descriptor n.  Only the first
                 line will be read from file descriptor n.  If you use  0  for
                 n,  the passphrase will be read from stdin.  This can only be
                 used if only one passphrase is supplied.

       --passphrase-file file
                 Read the passphrase from file file.  Only the first line will
                 be  read  from  file file.  This can only be used if only one
                 passphrase is supplied.  Obviously, a passphrase stored in  a
                 file is of questionable security if other users can read this
                 file.  Don't use this option if you can avoid it.

       --passphrase string
                 Use string as the passphrase.  This can only be used if  only
                 one passphrase is supplied.  Obviously, this is of very ques-
                 tionable security on a multi-user  system.   Don't  use  this
                 option if you can avoid it.




-- 
John P. Clizbe                      Inet:John (a) Mozilla-Enigmail.org
FSF Assoc #995 / FSFE Fellow #1797  hkp://keyserver.gingerbear.net  or
     mailto:pgp-public-keys at gingerbear.net?subject=HELP

Q:"Just how do the residents of Haiku, Hawai'i hold conversations?"
A:"An odd melody / island voices on the winds / surplus of vowels"

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 499 bytes
Desc: OpenPGP digital signature
URL: </pipermail/attachments/20101110/981a641c/attachment.pgp>


More information about the Gnupg-users mailing list