login about faq
0
1

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:

"C:\Program Files\SSH Communications Security\SSH Tectia Client\sftp2.exe" -B D:\DataDir\SRC\Feed.txt id@hostname

Here's a sample of the data in the Feed.txt file:

binary
cd public/data
lcd D:\DataDir\SRCMOD
get Feed.out
quit

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.

asked Nov 10 '10 at 21:25

D.A.'s gravatar image

D.A.
3

edited Nov 11 '10 at 08:10

Roman's gravatar image

Roman ♦♦
7735817


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:

sftp2.exe --password=YOURPASSWORD -B D:\DataDir\SRC\Feed.txt id@hostname
link

answered Nov 11 '10 at 09:57

Roman's gravatar image

Roman ♦♦
7735817

edited Nov 11 '10 at 11:04

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or __italic__
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×62
×12

Asked: Nov 10 '10 at 21:25

Seen: 8,200 times

Last updated: Jan 20 '11 at 12:22

All user contributed content licensed under the cc-by-sa license.
Powered by OSQA.