Can I pass the password from the command line?

Anthony Papillion anthony at cajuntechie.org
Wed Dec 16 00:21:44 CET 2015


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

On 12/15/2015 5:07 PM, Andrew Gallagher wrote:
> 
>> 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

Thank you for the quick answer, Andrew. After thinking about it, I can
see the absolute folly of having something set up the way I requested
and I appreciate you pointing that out. I had not thought about piping
to stdin - never even crossed my mind!

Thanks again!



-----BEGIN PGP SIGNATURE-----

iQIcBAEBCgAGBQJWcKCIAAoJEAKK33RTsEsVSPMQALJOsQ3u7RYyERyPoJUtde8W
bTTLaAXnfFmmhB/3EzNQBcrs0fPqc4uQ1UrB3iWITqA0rbf+9asrPETDaR3Ev2xq
ilmpuZAO678NetEcG1Pc7w0gM9hNd8hDQcolRECYRBXfoPchTxGI3jaYjd3IKuOa
W1jyUohW0kSkXg98m8GKkCrNTzLwePNWn9COXn7494Kq9rQLQ5+kCQmpjtSN64QY
AXhVo0JF8xK55QPcMlnW6F5N93jLHneY+ymyK36hF3NFQL1X7r0BKtvby9SNhon6
kq+3yd6YLw8mjAEplgKPRHYerKPjrdUNVS4PtbI7hcoO4EaPK2e8Wdrg4kfAokSV
q++n3ATsKResldBEZr6NOX425N5AmhIhtkMJt2l18V5mcyhWNwqpi4qkPwMmMlGA
uqPe1zjXAaGuouWdjo96HDDZvmZLrYo92fE3Or3oK9HyZMwn9i2+rTlqPuOFgXmR
VizXt04AZLKTDaC5X0VGMSsVLinmIDw0t+iky9jHfcttWpyPVHexozWLVosN7rJ2
+pSb5bU7HOZEUOXwaERzx/k5885m8hDkAIXuKscFHETLnTMXc00S3kZOMNdbqyRw
2NuL6FIA0VOGKZrJ/vUtHxyP16qjirlVRtsheX+MlXmUqYHEJDm6Cw4S3FtEZKo9
r6SnsxzigqY6CvbHOyGs
=4k1n
-----END PGP SIGNATURE-----




More information about the Gnupg-users mailing list