I am developing a script that will sign and encrypt a file.I have 2 problems:While running the script it sometimes ask for a passphrase then after entering it manually in the next run it will not ask me again. Then after some time it will ask me again for passphrase. Is it just a session after I enter the passphrase manually that after some time the session will end and I need to enter it again? If so how can I automate this? Command Used:gpg --always-trust --compress-algo 1 --cipher-algo cast5 --armor \    --recipient test@google.com --local-user localuser@google.com --passphrase asdf2lkjh \    --output done_output.txt.gpg -se o113142.outBefore I can sign + encrypt a file I need to execute screen command. I am using screen -m -d bash -c scriptname.sh, but upon checking the list of screen, every time I'm running the command another detached screen is added. How can I run the script that automatically executes the screen and exit the screen after the script is done running. I'm planning to run this via crontab and it needs to run without any manual entering of passphrase or killing the screen.
GPG Sign + Encrypt a file with passphrase
gpg