We recently upgraded from Tectia 4 to v6.0.12 for both server and client, and we're having issues with all of our sftp .bat file scripts. We're able to connect to each server manually by running the sftp2 id@hostname command from the command line. But when we run the .bat files that execute the commands and use a batch file, we're getting the following message: "error: could not connect to `hostname'"
Running in verbose mode does not provide enough detail to determine why it's failing. Here's a sample of our .bat files:
Here's a sample of the data in the Feed.txt file:
We've doublechecked the permissions and updated the .bat files to run the sftp2 executable in the new location. I can confirm we can connect to all of the servers manually. But the .bat scripts continue to fail.
Any help would be greatly appreciated. Thanks.
Probably failing due to requiring user interaction
My guess is that this is probably failing because it requires user interaction. When using the batch mode in sftp it will fail if any user interaction is required, such as accepting a hostkey or prompt for authentication.
Unfortunately the error message that is shown when this happens ("could not connect to host") is appalling and in dire need of fixing. I entered a case for this (FB#8308).
What authentication method is in use? Is a non-interactive authentication method configured, such as public-key with empty passphrase or password on command line (not recommended) ?
Just for testing, you could try using password on command line to see if this was the problem, like: