Can I pass the password from the command line?

Andrew Gallagher andrewg at andrewg.com
Wed Dec 16 00:07:04 CET 2015


> On 15 Dec 2015, at 22:58, Anthony Papillion <anthony at cajuntechie.org> wrote:
> 
> I'd like to script encryption and decryption from the command line. Is
> there a way to pass the encryption passphrase to GnuPG from the
> command line. 

I don't think there is a password parameter, and I'd strongly recommend not doing it even if there was. Many OSes make the command line parameters of processes available to any local user. 

Have you tried piping the password to stdin?

Andrew


More information about the Gnupg-users mailing list