bash - gpg batch-encryption with my own key without keyboard interaction -


i need save couple of files on webserver , have them encrypted own public key before.

therefore wrote simple bash-script:

#!/bin/bash    ls *.7z > filelist.txt  while read currow  gpg --encrypt -ac --recipient myemail@example.com $currow  done < filelist.txt rm filelist.txt 

but doesn't work. each file dialog have enter password (twice).

pinentry

how can avoid this? thank you

you using -c option, short equivalent of long --symmetric option. not using public key cryptography using option, why asked password.

try changing -ac -a in script above.


Comments

Popular posts from this blog

java - Date formats difference between yyyy-MM-dd'T'HH:mm:ss and yyyy-MM-dd'T'HH:mm:ssXXX -

c# - Get rid of xmlns attribute when adding node to existing xml -