How to run the sftp command with a password from Bash script?
You have a few options other than using public key authentication: Use keychain Use sshpass (less secured but probably that meets your requirement) Use expect (least secured and more coding needed) If you decide to give sshpass a chance here is a working script snippet to do so: export SSHPASS=your-password-here sshpass -e sftp -oBatchMode=no -b … Read more