I use the lftp script from Michael Hutter but would like to avoid storing the password in the script.
I have seen several suggestions but none pertinent to lftp. I thought I could avoid a password as a key-based ssh connection to the server exist, but was not successful. Alternatively, I have keys stored in gpg but do not see how access can be added to a bash script.
The script collects all the necessary parameters and then runs:
lftp -f "
open $HOST
user $USER $PASS
lcd $PCFOLDER
mirror $DRYRUN $REVERSE $IGNORESUBDIRS $DELETE $REMOVE $CONTINUEFILES $ONLYNEWER $CopyMoreThanOneFileSimultaneously --use-cache $ExcludeParams $VERBOSE $DIRECTORIES
bye
"
How to add a request to insert a password from the password store?