gpg passphrase automation
I am looking to try and automate a gpg decryption, the problem I run into is when it asks for a passphrase. I am having trouble finding a variable to allow the passphrase to run with the command.
I am aware of the security concerns, of having a clear text password. Ideally, I'd like to have a script file that is limited to only the user that would run it. Which would be the same user that is doing the decryption. I've tried a couple commands: gpg -d "file-name" --passphrase="phrase" , --passphrase "phrase" , --passphrase-file "file with passphrase in it" And a couple other variations. |
you ought to read the man page of gpg. There is an option: --passphrase-file (for example)
Quote:
|
The only option listed that I find is passphrase-fd, which doesn't seem to help.
|
Quote:
Quote:
Quote:
|
I'll have to check those out. The manpage I found didn't have any of that.
|
Well, I found how to do almost everything. I can get the file to output where I want, and use a passphrase, though it is clear text. I should be able to make a cron that calls the script which I should be able to secure.
gpg -d --output "output directory" --batch --passphrase "passphrase" "file name" It's a start. Now, I have been trying to see how I add other users that are allowed to use the gpg key. I made the key as root, and root can use it. But I'd like another user to be able to do it, as well. |
All times are GMT -5. The time now is 12:21 PM. |