Specify password to sftp in a Bash script [duplicate]
This question already has answers here : Closed 4 years ago . How to run the sftp command with a password from Bash script? (9 answers) I am trying to write a script to back up a file over SFTP. The problem is, it requires a password, and I see no way to manually specify a password to SFTP. I've heard about requiring no password by using public keys, but that requires being able to ssh into the remote server and modify some configuration files, which I cannot do. Currently my solution is to use cURL , but that is insecure (uses normal FTP). I also looked at the .netrc file, but that seems to