I ran below command line from a terminal and it works:
sftp -i ~/.ssh/id_rsa username@host
put csv_file
put manifest_file
I want to automatically run this so I created a .sh file that looks like below:
#!/bin/bash
sftp -i ~/.ssh/id_rsa username@host
put csv_file
put manifest_file
and save it as run.sh. I ran it like below:
sh run.sh
It connect to the host but the next commands, the put lines, did not run.
Can I get insights why is that and how can I solve it?