Can I pass the password from the command line?

Anthony Papillion anthony at cajuntechie.org
Tue Dec 15 23:58:21 CET 2015


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

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. For example:

gpg2 --encrypt --recipient --passphrase anthony at cajuntechie.org
SomePassphrase FileIWantToEncrypt

Is this possible at all? If so, how? Also, the same question for
decryption.

Thanks!
Anthony

- -- 
Phone:          1.845.666.1114
Skype:          cajuntechie
PGP Key:        0x028ADF7453B04B15
Fingerprint:    C5CE E687 DDC2 D12B 9063  56EA 028A DF74 53B0 4B15

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

iQIcBAEBCgAGBQJWcJsNAAoJEAKK33RTsEsVOWYP/0gJszoRDGauIsmMMqR+UWDF
Q4KkzzbqSNwJAc+xn+Rt1XnAYqK04cDfQjzAhTfJLnwGV47jfrS9GG/qfIPWgyv3
xilGvyrKXS2/YrNj+JGvcoN3S9jp2hrgXVoeqsx5Qiv7liG/NrajiStHnGXknqX5
lwXbuQ/o5BnHGS70s5mASGzgCWMUUxE5pB4EWJR247Dd0SevDBrE1XmEMxNFHoRj
yG4PXj1YVjaWQhNT/lF/fSZi49b0ufwovsciusQPxZmzPsd503KqS+qkwB6mAhur
mDu2BwqFu79qE4BJ3C4ccatbbxtfb6zmF703ChqnJLYef57Ox0mKnV8kxbHUSd+W
vViovg/ptSj60IH3ppS/pO3juma0KFQuFU8eztnzhvvTXnfWEik7d+Q6y9LRRLtM
x/Scujgjmk1SL3K15x8ZDnVOaQdit7q3Ylh6BKRnPnZiUWbd2UIDtrGXV9Av6Zrz
j4M0cuEdUVzMzwNie9SUstKcEoQ3mCBzVeIGVRv48MaNw40A1Q1e9g3P62/0zJJg
iqytI051E13bM/fF/uMt/j6OtpJHTXsfYHb3oYObmQGhMglReuPz4FbR3VcOSuc/
ge6zjcdkWrK5wGIRjCfjzQlEbEJZMzzchIQ7rnb7SJQw3VleBjHdzfQ+bi/6haxO
E6QOdTeRg9VbgsGFZaLx
=txgJ
-----END PGP SIGNATURE-----




More information about the Gnupg-users mailing list