SFTP - passing a password from within a script
Posted on 2002-07-01
I just about have everything working with SFTP. I tested SFTP using a batch file to pass it the commands and it works great. The problem I have though is it prompts me to put a password before it starts reading the file and processing the commands.
Here is the syntax I use from the command line:
sftp -b /path/genPluginBatch webuser@webhost
I tried putting the password as the first line in the batch file, genPluginBatch, but it sees this as a bad command. Any idea how I would pass the password from within a script?
Just so you know I also tried the following from within the script:
sftp wsadmin@uscscdev7 webuser@webhost <<EOF