I m trying to connect to SFTP server to fetch the data files regularly using automated shell script. I connect to the server as
user@$server
where it asks for password and I enter the password then I can run regular SFTP commands get
and mget
to fetch files.
The concern is that I have to provide password manually and it opens interactive shell. How can I run all these in just one command or without manual intervention.?
Although How to run the sftp command with a password from Bash script? answers little bit, I don't have privileges to install additional commandline utilities on my server.
I was wondering if there is any other way to solve this issue.