Trouble SFTP connection TimeOut Setting

Advertisement

johnHuynh
Joined:
Posts:
5
Location:
Brampton

Trouble SFTP connection TimeOut Setting

Hi;

I tried to change the TimeOut on a SFTP connection to a different value, but its appear that WinSCP doesn't accept new value, and default to 15 sec. The new value is accept for FTP connection. I even tried to use winscp.com /timeout=150 parameter, but its still doesn't work and default to 15 sec instead of 150 seconds.

I'm using Winscp 4.2.3 version.

Thanks
John[/u]

Reply with quote

Advertisement

johnHuynh
Joined:
Posts:
5
Location:
Brampton

Re:Trouble SFTP connection TimeOut Setting

I want to configured the "Server Response Timeout" for one of my stored session. If I open the connection through UI, the new value is accepted, however, if I open the connection through command-line winscp.com /script=scriptfile, the new value is not accepted and default to 15 sec.

The scriptfile has stored session information and its should accept new value for the server response timeout.
option batch on
option confirm off
open store@sssionname
lcd c:\testing
cd /prod/in
put -delete *.*
close
exit

Thank for your help.
john.

Reply with quote

martin
Site Admin
martin avatar

Re:Trouble SFTP connection TimeOut Setting

So do you have stored session "store@sssionname" that has the timeout set?

Reply with quote

johnHuynh
Joined:
Posts:
5
Location:
Brampton

Re: Trouble SFTP connection TimeOut Setting

Yes, I put 150 secs in the "Server response timeout" on "store@sssionname". As I mentioned before, using UI, the 150 sec is accepted, but using
winscp.com /script=scriptfile.txt
, its default to 15 secs.

Any help would be greatly appreciated!
John.[/code]

Reply with quote

Advertisement

johnHuynh
Joined:
Posts:
5
Location:
Brampton

Re: Trouble SFTP connection TimeOut Setting

Below log listing of two different sessions with exact same stored "user1@localhost" session, UI and via winscp.com /script=scriptfile.txt /log=log.txt

[log]
. 2011-10-27 10:52:25.544 --------------------------------------------------------------------------
. 2011-10-27 10:52:25.544 WinSCP Version 4.3.5 (Build 1463) (OS 5.1.2600 Service Pack 3)
. 2011-10-27 10:52:25.544 Configuration: HKEY_CURRENT_USER\Software\Martin Prikryl\WinSCP 2\
. 2011-10-27 10:52:25.544 Local account: ACCOUNT NAME REMOVED
. 2011-10-27 10:52:25.544 Login time: Thursday, October 27, 2011 10:52:25 AM
. 2011-10-27 10:52:25.544 --------------------------------------------------------------------------
. 2011-10-27 10:52:25.544 Session name: user1@localhost (Modified stored session)
. 2011-10-27 10:52:25.544 Host name: localhost (Port: 22)
. 2011-10-27 10:52:25.544 User name: user1 (Password: Yes, Key file: No)
. 2011-10-27 10:52:25.544 Tunnel: No
. 2011-10-27 10:52:25.544 Transfer Protocol: SFTP
. 2011-10-27 10:52:25.544 Ping type: -, Ping interval: 30 sec; Timeout: 150 sec
. 2011-10-27 10:52:25.544 Proxy: none
. 2011-10-27 10:52:25.544 SSH protocol version: 2; Compression: No
. 2011-10-27 10:52:25.544 Bypass authentication: No
. 2011-10-27 10:52:25.544 Try agent: Yes; Agent forwarding: No; TIS/CryptoCard: No; KI: Yes; GSSAPI: No
. 2011-10-27 10:52:25.544 Ciphers: aes,blowfish,3des,WARN,arcfour,des; Ssh2DES: No
. 2011-10-27 10:52:25.544 SSH Bugs: -,-,-,-,-,-,-,-,-
. 2011-10-27 10:52:25.544 SFTP Bugs: -,-
. 2011-10-27 10:52:25.544 Return code variable: Autodetect; Lookup user groups: Yes
. 2011-10-27 10:52:25.544 Shell: default
. 2011-10-27 10:52:25.560 EOL: 0, UTF: 2
. 2011-10-27 10:52:25.560 Clear aliases: Yes, Unset nat.vars: Yes, Resolve symlinks: Yes
. 2011-10-27 10:52:25.560 LS: ls -la, Ign LS warn: Yes, Scp1 Comp: No
. 2011-10-27 10:52:25.560 Local directory: default, Remote directory: home, Update: No, Cache: Yes
. 2011-10-27 10:52:25.560 Cache directory changes: Yes, Permanent: Yes
. 2011-10-27 10:52:25.560 DST mode: 1
. 2011-10-27 10:52:25.560 --------------------------------------------------------------------------
. 2011-10-27 10:52:25.576 Looking up host "localhost"
. 2011-10-27 10:52:25.622 Connecting to 127.0.0.1 port 22
. 2011-10-27 10:52:25.638 Server version: SSH-2.0-CoreFTP-0.2.2
. 2011-10-27 10:52:25.638 We believe remote version has SSH-2 ignore bug
. 2011-10-27 10:52:25.638 Using SSH protocol version 2
. 2011-10-27 10:52:25.638 We claim version: SSH-2.0-WinSCP_release_4.3.5
. 2011-10-27 10:52:25.638 Using Diffie-Hellman with standard group "group14"
. 2011-10-27 10:52:25.638 Doing Diffie-Hellman key exchange with hash SHA-1
. 2011-10-27 10:52:26.965 Host key fingerprint is:
. 2011-10-27 10:52:26.965 ssh-rsa 1024 be:8d:1c:02:f0:8b:0a:2d:a9:f3:48:df:8d:11:c8:71
. 2011-10-27 10:52:26.965 Initialised AES-256 CBC client->server encryption
. 2011-10-27 10:52:26.965 Initialised HMAC-SHA1 client->server MAC algorithm
. 2011-10-27 10:52:26.965 Initialised AES-256 CBC server->client encryption
. 2011-10-27 10:52:26.965 Initialised HMAC-SHA1 server->client MAC algorithm
! 2011-10-27 10:52:26.965 Using username "user1".
. 2011-10-27 10:52:26.965 Prompt (7, SSH password, , &Password: )
. 2011-10-27 10:52:26.965 Using stored password.
. 2011-10-27 10:52:26.981 Sent password
. 2011-10-27 10:52:28.839 Access granted
. 2011-10-27 10:52:28.839 Opened channel for session
. 2011-10-27 10:52:28.839 Started a shell/command
. 2011-10-27 10:52:28.839 --------------------------------------------------------------------------
. 2011-10-27 10:52:28.839 Using SFTP protocol.
. 2011-10-27 10:52:28.839 Doing startup conversation with host.
> 2011-10-27 10:52:28.839 Type: SSH_FXP_INIT, Size: 5, Number: -1
< 2011-10-27 10:52:28.839 Type: SSH_FXP_VERSION, Size: 5, Number: -1
. 2011-10-27 10:52:28.839 SFTP version 3 negotiated.
. 2011-10-27 10:52:28.839 We believe the server has signed timestamps bug
. 2011-10-27 10:52:28.839 We will use UTF-8 strings for status messages only
. 2011-10-27 10:52:28.839 Getting current directory name.
. 2011-10-27 10:52:28.839 Getting real path for '.'
> 2011-10-27 10:52:28.839 Type: SSH_FXP_REALPATH, Size: 10, Number: 16
< 2011-10-27 10:52:28.870 Type: SSH_FXP_NAME, Size: 23, Number: 16
. 2011-10-27 10:52:28.870 Real path is '/'
. 2011-10-27 10:52:28.870 Listing directory "/".
> 2011-10-27 10:52:28.870 Type: SSH_FXP_OPENDIR, Size: 10, Number: 267
< 2011-10-27 10:52:28.886 Type: SSH_FXP_HANDLE, Size: 22, Number: 267
> 2011-10-27 10:52:28.886 Type: SSH_FXP_READDIR, Size: 22, Number: 524
< 2011-10-27 10:52:28.886 Type: SSH_FXP_NAME, Size: 528, Number: 524
> 2011-10-27 10:52:28.886 Type: SSH_FXP_READDIR, Size: 22, Number: 780
< 2011-10-27 10:52:28.886 Type: SSH_FXP_STATUS, Size: 28, Number: 780
< 2011-10-27 10:52:28.886 Status code: 1
> 2011-10-27 10:52:28.886 Type: SSH_FXP_CLOSE, Size: 22, Number: 1028
. 2011-10-27 10:52:28.886 Startup conversation with host finished.


. 2011-10-27 10:53:27.255 --------------------------------------------------------------------------
. 2011-10-27 10:53:27.255 WinSCP Version 4.3.5 (Build 1463) (OS 5.1.2600 Service Pack 3)
. 2011-10-27 10:53:27.255 Configuration: HKEY_CURRENT_USER\Software\Martin Prikryl\WinSCP 2\
. 2011-10-27 10:53:27.255 Local account: ACCOUNT NAME REMOVED
. 2011-10-27 10:53:27.255 Login time: Thursday, October 27, 2011 10:53:27 AM
. 2011-10-27 10:53:27.255 --------------------------------------------------------------------------
. 2011-10-27 10:53:27.255 Session name: user1@localhost (Modified stored session)
. 2011-10-27 10:53:27.255 Host name: localhost (Port: 22)
. 2011-10-27 10:53:27.255 User name: user1 (Password: Yes, Key file: No)
. 2011-10-27 10:53:27.255 Tunnel: No
. 2011-10-27 10:53:27.255 Transfer Protocol: SFTP (SCP)
. 2011-10-27 10:53:27.255 Ping type: -, Ping interval: 30 sec; Timeout: 15 sec
. 2011-10-27 10:53:27.255 Proxy: none
. 2011-10-27 10:53:27.255 SSH protocol version: 2; Compression: No
. 2011-10-27 10:53:27.255 Bypass authentication: No
. 2011-10-27 10:53:27.255 Try agent: Yes; Agent forwarding: No; TIS/CryptoCard: No; KI: Yes; GSSAPI: No
. 2011-10-27 10:53:27.255 Ciphers: aes,blowfish,3des,WARN,arcfour,des; Ssh2DES: No
. 2011-10-27 10:53:27.255 SSH Bugs: -,-,-,-,-,-,-,-,-
. 2011-10-27 10:53:27.255 SFTP Bugs: -,-
. 2011-10-27 10:53:27.255 Return code variable: Autodetect; Lookup user groups: Yes
. 2011-10-27 10:53:27.255 Shell: default
. 2011-10-27 10:53:27.255 EOL: 0, UTF: 2
. 2011-10-27 10:53:27.255 Clear aliases: Yes, Unset nat.vars: Yes, Resolve symlinks: Yes
. 2011-10-27 10:53:27.255 LS: ls -la, Ign LS warn: Yes, Scp1 Comp: No
. 2011-10-27 10:53:27.255 Local directory: default, Remote directory: home, Update: No, Cache: Yes
. 2011-10-27 10:53:27.255 Cache directory changes: Yes, Permanent: Yes
. 2011-10-27 10:53:27.255 DST mode: 1
. 2011-10-27 10:53:27.255 --------------------------------------------------------------------------
. 2011-10-27 10:53:27.255 Looking up host "localhost"
. 2011-10-27 10:53:27.270 Connecting to 127.0.0.1 port 22
. 2011-10-27 10:53:27.270 Server version: SSH-2.0-CoreFTP-0.2.2
. 2011-10-27 10:53:27.270 We believe remote version has SSH-2 ignore bug
. 2011-10-27 10:53:27.270 Using SSH protocol version 2
. 2011-10-27 10:53:27.270 We claim version: SSH-2.0-WinSCP_release_4.3.5
. 2011-10-27 10:53:27.286 Using Diffie-Hellman with standard group "group14"
. 2011-10-27 10:53:27.286 Doing Diffie-Hellman key exchange with hash SHA-1
. 2011-10-27 10:53:28.176 Host key fingerprint is:
. 2011-10-27 10:53:28.176 ssh-rsa 1024 be:8d:1c:02:f0:8b:0a:2d:a9:f3:48:df:8d:11:c8:71
. 2011-10-27 10:53:28.176 Initialised AES-256 CBC client->server encryption
. 2011-10-27 10:53:28.176 Initialised HMAC-SHA1 client->server MAC algorithm
. 2011-10-27 10:53:28.192 Initialised AES-256 CBC server->client encryption
. 2011-10-27 10:53:28.192 Initialised HMAC-SHA1 server->client MAC algorithm
! 2011-10-27 10:53:28.192 Using username "user1".
. 2011-10-27 10:53:28.192 Prompt (7, SSH password, , &Password: )
. 2011-10-27 10:53:28.192 Using stored password.
. 2011-10-27 10:53:28.192 Sent password
. 2011-10-27 10:53:28.192 Access granted
. 2011-10-27 10:53:28.192 Opened channel for session
. 2011-10-27 10:53:28.207 Started a shell/command
. 2011-10-27 10:53:28.207 --------------------------------------------------------------------------
. 2011-10-27 10:53:28.207 Using SFTP protocol.
. 2011-10-27 10:53:28.207 Doing startup conversation with host.
> 2011-10-27 10:53:28.207 Type: SSH_FXP_INIT, Size: 5, Number: -1
< 2011-10-27 10:53:28.207 Type: SSH_FXP_VERSION, Size: 5, Number: -1
. 2011-10-27 10:53:28.207 SFTP version 3 negotiated.
. 2011-10-27 10:53:28.207 We believe the server has signed timestamps bug
. 2011-10-27 10:53:28.207 We will use UTF-8 strings for status messages only
. 2011-10-27 10:53:28.207 Getting current directory name.
. 2011-10-27 10:53:28.207 Getting real path for '.'
> 2011-10-27 10:53:28.207 Type: SSH_FXP_REALPATH, Size: 10, Number: 16
< 2011-10-27 10:53:28.207 Type: SSH_FXP_NAME, Size: 23, Number: 16
. 2011-10-27 10:53:28.207 Real path is '/'
. 2011-10-27 10:53:28.207 Startup conversation with host finished.
< 2011-10-27 10:53:28.207 Script: Active session: [1] user1@localhost
> 2011-10-27 10:53:28.207 Script: lcd c:\messages\
< 2011-10-27 10:53:28.254 Script: c:\messages\out
> 2011-10-27 10:53:28.254 Script: cd /dev/in
. 2011-10-27 10:53:28.254 Changing directory to "/dev/in".
. 2011-10-27 10:53:28.254 Getting real path for '/dev/in'
> 2011-10-27 10:53:28.254 Type: SSH_FXP_REALPATH, Size: 16, Number: 272
< 2011-10-27 10:53:28.254 Type: SSH_FXP_STATUS, Size: 29, Number: 272
< 2011-10-27 10:53:28.254 Status code: 2, Message: 272, Server: No such file, Language:
* 2011-10-27 10:53:28.254 (ECommand) Error changing directory to '/dev/in'.
* 2011-10-27 10:53:28.254 Cannot get real path for '/dev/in'.
* 2011-10-27 10:53:28.254 No such file or directory.
* 2011-10-27 10:53:28.254 Error code: 2
* 2011-10-27 10:53:28.254 Error message from server: No such file
* 2011-10-27 10:53:28.254 Request code: 16
< 2011-10-27 10:53:28.254 Script: /
. 2011-10-27 10:53:28.254 Script: Failed
> 2011-10-27 10:53:28.254 Script: close
. 2011-10-27 10:53:28.254 Closing connection.
. 2011-10-27 10:53:28.254 Sending special code: 12
. 2011-10-27 10:53:28.254 Sent EOF message
[/log][/b]

Reply with quote

martin
Site Admin
martin avatar

Re: Trouble SFTP connection TimeOut Setting

I suppose (hope) that the account "ACCOUNT NAME REMOVED" was the same, wasn't it?
If it was, please check my email with link to a debug version that I have just sent.

Reply with quote

johnHuynh
Joined:
Posts:
5
Location:
Brampton

Re: Trouble SFTP connection TimeOut Setting

Thanks; I finally know what the problem was; its was within my script. During the trouble shooting with the Debug version, I realized that instead of open the stored session, I had the winscp.com open entirely new connection,
open username:password@host:port
, in which the default timeout is set at 15 sec.

Thanks for your help.
John.

Reply with quote

Advertisement

BigDaddyE_
Guest

Re: Trouble SFTP connection TimeOut Setting

johnHuynh wrote:

Thanks; I finally know what the problem was; its was within my script. During the trouble shooting with the Debug version, I realized that instead of open the stored session, I had the winscp.com open entirely new connection,
open username:password@host:port
, in which the default timeout is set at 15 sec.

Thanks for your help.
John.

I have tried to set a timeout value in version 5.1.7 usign a script file.
I tried -timeout=120 as a parm to the Open command in the script
I tried /timeout=120 as a parm to the winscp call in the DOS window

Sorry, the timeout in the log is always 15:
Ping type: -, Ping interval: 30 sec; Timeout: 15 sec

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
41,367
Location:
Prague, Czechia

Re: Trouble SFTP connection TimeOut Setting

BigDaddyE_ wrote:

I have tried to set a timeout value in version 5.1.7 usign a script file.
I tried -timeout=120 as a parm to the Open command in the script
This is correct.

Sorry, the timeout in the log is always 15:
Ping type: -, Ping interval: 30 sec; Timeout: 15 sec
Please attach a full log file showing the problem (using the latest version of WinSCP, ideally using WnSCP 5.2.3 beta).

To generate log file, use /log=path_to_log_file command-line argument. Submit the log with your post as an attachment. Note that passwords and passphrases not stored in the log. You may want to remove other data you consider sensitive though, such as host names, IP addresses, account names or file names (unless they are relevant to the problem). If you do not want to post the log publicly, you may email it to me. You will find my address (if you log in) in my forum profile. Please include link back to this topic in your email. Also note in this topic that you have emailed the log.

Reply with quote

jirlbeck
Joined:
Posts:
9
Location:
Chicago

session 'Timeout Timespan setting

I am having this issue when I have a session invoked from Excel using VBA. I have tried several different syntax approaches but cannot find one that works. How can I set the session timespan timeout option to 100 using VBA?

Reply with quote

Advertisement

You can post new topics in this forum