Post a reply

Before posting, please read how to report bug or request support effectively.

Bug reports without an attached log file are usually useless.

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

Guest

Re: timeout

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

Re: timeout

You have to add -timeout switch to open command:
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
Oxy

timeout

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.

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.


\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 :
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