Initial connection fails because of wrong server version

Advertisement

apham
Guest

Initial connection fails because of wrong server version

I have a schedule job that runs a ssis package and it always fails to connect on the first connection attempt. I'm looking at the log and it chooses the wrong server version on the first attempt so it would "server unexpectedly closed network connection". Is there a way to script the correct server version?

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
28,658
Location:
Prague, Czechia

Re: Initial connection fails because of wrong server version

What do you mean by "server version"?

Reply with quote

apham
Guest

here's the portion of the log where it chooses the wrong server version

. 2016-03-28 08:00:14.155 Server version: SSH-2.0-PaloAltoNetworks_0.2
. 2016-03-28 08:00:14.155 We believe remote version has SSH-2 ignore bug
. 2016-03-28 08:00:14.170 Using SSH protocol version 2
. 2016-03-28 08:00:14.170 We claim version: SSH-2.0-WinSCP_release_4.3.5
. 2016-03-28 08:00:14.342 Server unexpectedly closed network connection


The correct server version should be SSH-2.0-zFTPServer

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
28,658
Location:
Prague, Czechia

The server version comes from the server. WinSCP does not choose it.

Please attach a complete session log file from both the successful and failing session.

Reply with quote

apham
Guest

. 2016-04-01 08:00:12.386 WinSCP Version 4.3.5 (Build 1463) (OS 6.1.7601 Service Pack 1)
. 2016-04-01 08:00:12.386 Configuration: \\ihc-win-sdrv.interhealth.org\MIS$\Ambulatory\APham\Connect Experience\WinSCP.ini
. 2016-04-01 08:00:12.386 Local account: INTERHEALTH\svc_sqlreports
. 2016-04-01 08:00:12.401 Login time: Friday, April 01, 2016 8:00:12 AM
. 2016-04-01 08:00:12.401 --------------------------------------------------------------------------
. 2016-04-01 08:00:12.401 Session name: ConnectPIHHealth3366@sftp.nationalresearch.com (Ad-Hoc session)
. 2016-04-01 08:00:12.401 Host name: sftp.nationalresearch.com (Port: 22)
. 2016-04-01 08:00:12.401 User name: ConnectPIHHealth3366 (Password: Yes, Key file: No)
. 2016-04-01 08:00:12.401 Tunnel: No
. 2016-04-01 08:00:12.401 Transfer Protocol: SFTP
. 2016-04-01 08:00:12.401 Ping type: -, Ping interval: 30 sec; Timeout: 15 sec
. 2016-04-01 08:00:12.401 Proxy: none
. 2016-04-01 08:00:12.401 SSH protocol version: 2; Compression: No
. 2016-04-01 08:00:12.401 Bypass authentication: No
. 2016-04-01 08:00:12.401 Try agent: Yes; Agent forwarding: No; TIS/CryptoCard: No; KI: Yes; GSSAPI: No
. 2016-04-01 08:00:12.401 Ciphers: aes,blowfish,3des,WARN,arcfour,des; Ssh2DES: No
. 2016-04-01 08:00:12.417 SSH Bugs: -,-,-,-,-,-,-,-,-
. 2016-04-01 08:00:12.417 SFTP Bugs: -,-
. 2016-04-01 08:00:12.417 Return code variable: Autodetect; Lookup user groups: Yes
. 2016-04-01 08:00:12.417 Shell: default
. 2016-04-01 08:00:12.417 EOL: 0, UTF: 2
. 2016-04-01 08:00:12.417 Clear aliases: Yes, Unset nat.vars: Yes, Resolve symlinks: Yes
. 2016-04-01 08:00:12.417 LS: ls -la, Ign LS warn: Yes, Scp1 Comp: No
. 2016-04-01 08:00:12.417 Local directory: default, Remote directory: home, Update: No, Cache: Yes
. 2016-04-01 08:00:12.417 Cache directory changes: Yes, Permanent: Yes
. 2016-04-01 08:00:12.417 DST mode: 1
. 2016-04-01 08:00:12.417 --------------------------------------------------------------------------
. 2016-04-01 08:00:12.417 Looking up host "sftp.nationalresearch.com"
. 2016-04-01 08:00:12.511 Connecting to 98.142.94.94 port 22
. 2016-04-01 08:00:12.620 Server version: SSH-2.0-PaloAltoNetworks_0.2
. 2016-04-01 08:00:12.620 We believe remote version has SSH-2 ignore bug
. 2016-04-01 08:00:12.620 Using SSH protocol version 2
. 2016-04-01 08:00:12.620 We claim version: SSH-2.0-WinSCP_release_4.3.5
. 2016-04-01 08:00:12.791 Server unexpectedly closed network connection
. 2016-04-01 08:01:13.024 --------------------------------------------------------------------------
. 2016-04-01 08:01:13.024 WinSCP Version 4.3.5 (Build 1463) (OS 6.1.7601 Service Pack 1)
. 2016-04-01 08:01:13.024 Configuration: \\ihc-win-sdrv.interhealth.org\MIS$\Ambulatory\APham\Connect Experience\WinSCP.ini
. 2016-04-01 08:01:13.024 Local account: INTERHEALTH\svc_sqlreports
. 2016-04-01 08:01:13.039 Login time: Friday, April 01, 2016 8:01:13 AM
. 2016-04-01 08:01:13.039 --------------------------------------------------------------------------
. 2016-04-01 08:01:13.039 Session name: ConnectPIHHealth3366@sftp.nationalresearch.com (Ad-Hoc session)
. 2016-04-01 08:01:13.039 Host name: sftp.nationalresearch.com (Port: 22)
. 2016-04-01 08:01:13.039 User name: ConnectPIHHealth3366 (Password: Yes, Key file: No)
. 2016-04-01 08:01:13.039 Tunnel: No
. 2016-04-01 08:01:13.039 Transfer Protocol: SFTP
. 2016-04-01 08:01:13.055 Ping type: -, Ping interval: 30 sec; Timeout: 15 sec
. 2016-04-01 08:01:13.055 Proxy: none
. 2016-04-01 08:01:13.055 SSH protocol version: 2; Compression: No
. 2016-04-01 08:01:13.055 Bypass authentication: No
. 2016-04-01 08:01:13.055 Try agent: Yes; Agent forwarding: No; TIS/CryptoCard: No; KI: Yes; GSSAPI: No
. 2016-04-01 08:01:13.055 Ciphers: aes,blowfish,3des,WARN,arcfour,des; Ssh2DES: No
. 2016-04-01 08:01:13.055 SSH Bugs: -,-,-,-,-,-,-,-,-
. 2016-04-01 08:01:13.071 SFTP Bugs: -,-
. 2016-04-01 08:01:13.071 Return code variable: Autodetect; Lookup user groups: Yes
. 2016-04-01 08:01:13.071 Shell: default
. 2016-04-01 08:01:13.071 EOL: 0, UTF: 2
. 2016-04-01 08:01:13.071 Clear aliases: Yes, Unset nat.vars: Yes, Resolve symlinks: Yes
. 2016-04-01 08:01:13.071 LS: ls -la, Ign LS warn: Yes, Scp1 Comp: No
. 2016-04-01 08:01:13.086 Local directory: default, Remote directory: home, Update: No, Cache: Yes
. 2016-04-01 08:01:13.086 Cache directory changes: Yes, Permanent: Yes
. 2016-04-01 08:01:13.086 DST mode: 1
. 2016-04-01 08:01:13.086 --------------------------------------------------------------------------
. 2016-04-01 08:01:13.086 Looking up host "sftp.nationalresearch.com"
. 2016-04-01 08:01:13.102 Connecting to 98.142.94.94 port 22
. 2016-04-01 08:01:14.209 Server version: SSH-2.0-zFTPServer
. 2016-04-01 08:01:14.209 We believe remote version has SSH-2 ignore bug
. 2016-04-01 08:01:14.209 Using SSH protocol version 2
. 2016-04-01 08:01:14.209 We claim version: SSH-2.0-WinSCP_release_4.3.5
. 2016-04-01 08:01:14.381 Using Diffie-Hellman with standard group "group1"
. 2016-04-01 08:01:14.381 Doing Diffie-Hellman key exchange with hash SHA-1
. 2016-04-01 08:01:14.818 Host key fingerprint is:
. 2016-04-01 08:01:14.818 ssh-rsa 2048 25:41:0b:ed:48:a0:00:e2:f6:dd:e9:c1:1e:d2:db:c7
. 2016-04-01 08:01:14.818 Initialised AES-256 SDCTR client->server encryption
. 2016-04-01 08:01:14.818 Initialised HMAC-SHA1 client->server MAC algorithm
. 2016-04-01 08:01:14.880 Initialised AES-256 SDCTR server->client encryption
. 2016-04-01 08:01:14.880 Initialised HMAC-SHA1 server->client MAC algorithm
! 2016-04-01 08:01:14.943 Using username "ConnectPIHHealth3366".
. 2016-04-01 08:01:15.005 Prompt (7, SSH password, , &Password: )
. 2016-04-01 08:01:15.005 Using stored password.
. 2016-04-01 08:01:15.005 Sent password
. 2016-04-01 08:01:15.067 Access granted
. 2016-04-01 08:01:15.130 Opened channel for session
. 2016-04-01 08:01:15.457 Started a shell/command

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
28,658
Location:
Prague, Czechia

Either the SFTP server is broken; you have two SFTP servers running on the server machine, fighting for the 22 port.

Also, you urgently need to upgrade WinSCP (but that's not related to the problem).

Reply with quote

Advertisement

You can post new topics in this forum