Topic "timeout"

Author Message
Oxy

Guest


Hello,
I'm working with winscp 4.3.6 build 1655
I'm trying to download files from a script through SFTP and I'm getting a 'host is not communicating for more than 15 seconds....'

If I connect interactively I just ignore the message (don't press A) and finally it is getting connected however with a script file it is like it automatically answer Abort the question.

I also tried to set the timeout on the command line but with no effect.

Code:
bin\Debug>WinSCP.com /script:winscpCommands.txt
batch           on
confirm         off
Searching for host...
Connecting to host...
Authenticating...
Using username "natixer".
Authenticating with pre-entered password.
Host is not communicating for more than 15 seconds. Still waiting...
Warning: Aborting this operation will close connection!
(A)bort: Abort
Terminated by user.
Authentication log (see session log for details):
Using username "natixer".

Authentication failed.
No session.
No session.


Code:

\bin\Debug>WinSCP.com /script:winscpCommands.txt /timeout:29
batch           on
confirm         off
Searching for host...
Connecting to host...
Authenticating...
Using username "natixer".
Authenticating with pre-entered password.
Host is not communicating for more than 15 seconds. Still waiting...
Warning: Aborting this operation will close connection!
(A)bort: Abort
Terminated by user.
Authentication log (see session log for details):
Using username "natixer".

Authentication failed.
No session.
No session.


In the second log we can see I tried to set the timeout on the command line but It is still telling me that the server has been inactive for 15s (whereas I set a timeout to 29).

My script looks like :
Code:

option batch on
option confirm off
open sftp://user:password@host.net:2245 -hostkey="ssh-rsa 1024 00:00:00:00:00:00:00:00:00:00:00"
cd /
get myfile
Exit


How could I prevent the script from aborting the connection or setting a timeout on the command line on in the script ?

I am currently working on a workaround using an ini file but It is not viable on the longterm as I am managing too much destination so I will have to predefined as many ini file as host I want to connect to.

thank you for any help
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24993
Location: Prague, Czechia
You have to add -timeout switch to open command:
Code:
open sftp://user:password@host.net:2245 -timeout=29 -hostkey="ssh-rsa 1024 00:00:00:00:00:00:00:00:00:00:00"


See https://winscp.net/eng/docs/scriptcommand_open
Guest




Thank you.... I've been looking in the doc without findind this :/
thanks again !
Advertisements

You can post new topics in this forum






Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License