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

yaro

I'm getting into exactly the same situation. First access granted than the server disconnects.
walsallwing

ESshFatal) Connection has been unexpectedly closed.

Sorry to interrupt your thread but it seems that I am encountering the same problem. Many apologies but I am no SFTP or network expert but merely trying to connect to a site using SFTP. From the log i get the following:

. 2010-07-06 18:20:50.232 --------------------------------------------------------------------------
. 2010-07-06 18:20:50.232 WinSCP Version 4.1.9 (Build 416) (OS 5.1.2600 Service Pack 3)
. 2010-07-06 18:20:50.232 Login time: 06 July 2010 18:20:50
. 2010-07-06 18:20:50.232 --------------------------------------------------------------------------
. 2010-07-06 18:20:50.232 Session name: Visa VAU
. 2010-07-06 18:20:50.232 Host name: XXX.XXX.XXX.XXX (Port: 22)
. 2010-07-06 18:20:50.232 User name: NNNNNNN (Password: No, Key file: Yes)
. 2010-07-06 18:20:50.232 Tunnel: No
. 2010-07-06 18:20:50.232 Transfer Protocol: SFTP (SCP)
. 2010-07-06 18:20:50.232 Ping type: -, Ping interval: 30 sec; Timeout: 15 sec
. 2010-07-06 18:20:50.232 Proxy: none
. 2010-07-06 18:20:50.232 SSH protocol version: 2; Compression: No
. 2010-07-06 18:20:50.232 Bypass authentication: No
. 2010-07-06 18:20:50.232 Try agent: Yes; Agent forwarding: No; TIS/CryptoCard: No; KI: Yes; GSSAPI: No
. 2010-07-06 18:20:50.232 Ciphers: aes,blowfish,3des,WARN,arcfour,des; Ssh2DES: No
. 2010-07-06 18:20:50.232 SSH Bugs: -,-,-,-,-,-,-,-
. 2010-07-06 18:20:50.232 SFTP Bugs: -,-
. 2010-07-06 18:20:50.232 Return code variable: Autodetect; Lookup user groups: Yes
. 2010-07-06 18:20:50.232 Shell: default, EOL: 0
. 2010-07-06 18:20:50.232 Clear aliases: Yes, Unset nat.vars: Yes, Resolve symlinks: Yes
. 2010-07-06 18:20:50.232 LS: ls -la, Ign LS warn: Yes, Scp1 Comp: No
. 2010-07-06 18:20:50.232 Local directory: default, Remote directory: home, Update: No, Cache: Yes
. 2010-07-06 18:20:50.232 Cache directory changes: Yes, Permanent: Yes
. 2010-07-06 18:20:50.232 DST mode: 1
. 2010-07-06 18:20:50.232 --------------------------------------------------------------------------
. 2010-07-06 18:20:50.248 Looking up host "XXX.XXX.XXX.XXX"
. 2010-07-06 18:20:50.248 Connecting to XXX.XXX.XXX.XXX port 22
. 2010-07-06 18:20:50.263 Selecting events 63 for socket 472
. 2010-07-06 18:20:50.263 Waiting for the server to continue with the initialisation
. 2010-07-06 18:20:50.263 Looking for incoming data
. 2010-07-06 18:20:50.263 Looking for network events
. 2010-07-06 18:20:50.263 Detected network event
. 2010-07-06 18:20:50.263 Enumerating network events for socket 472
. 2010-07-06 18:20:50.263 Enumerated 18 network events making 18 cumulative events for socket 472
. 2010-07-06 18:20:50.263 Handling network write event on socket 472 with error 0
. 2010-07-06 18:20:50.263 Handling network connect event on socket 472 with error 0
. 2010-07-06 18:20:50.263 Looking for network events
. 2010-07-06 18:20:50.279 Detected network event
. 2010-07-06 18:20:50.279 Enumerating network events for socket 472
. 2010-07-06 18:20:50.279 Enumerated 1 network events making 1 cumulative events for socket 472
. 2010-07-06 18:20:50.279 Handling network read event on socket 472 with error 0
. 2010-07-06 18:20:50.279 Server version: SSH-2.0-OpenSSH_5.0
. 2010-07-06 18:20:50.279 We claim version: SSH-2.0-WinSCP_release_4.1.9
. 2010-07-06 18:20:50.295 SSPI: acquired credentials for: beaadmin@LCY.GBR.HKBEA.COM
. 2010-07-06 18:20:50.295 Cannot convert IP address to SPN: DNS is not trusted
. 2010-07-06 18:20:50.295 GSSKEX disabled: The operation completed successfully.

. 2010-07-06 18:20:50.295 Using SSH protocol version 2
. 2010-07-06 18:20:50.295 Waiting for the server to continue with the initialisation
. 2010-07-06 18:20:50.295 Looking for incoming data
. 2010-07-06 18:20:50.295 Looking for network events
. 2010-07-06 18:20:50.295 Detected network event
. 2010-07-06 18:20:50.295 Enumerating network events for socket 472
. 2010-07-06 18:20:50.295 Enumerated 1 network events making 1 cumulative events for socket 472
. 2010-07-06 18:20:50.295 Handling network read event on socket 472 with error 0
. 2010-07-06 18:20:50.295 Doing Diffie-Hellman group exchange
. 2010-07-06 18:20:50.295 Waiting for the server to continue with the initialisation
. 2010-07-06 18:20:50.295 Looking for incoming data
. 2010-07-06 18:20:50.295 Looking for network events
. 2010-07-06 18:20:50.513 Detected network event
. 2010-07-06 18:20:50.826 Enumerating network events for socket 472
. 2010-07-06 18:20:50.826 Enumerated 1 network events making 1 cumulative events for socket 472
. 2010-07-06 18:20:50.826 Handling network read event on socket 472 with error 0
. 2010-07-06 18:20:50.826 Doing Diffie-Hellman key exchange with hash SHA-1
. 2010-07-06 18:20:50.888 Waiting for the server to continue with the initialisation
. 2010-07-06 18:20:50.888 Looking for incoming data
. 2010-07-06 18:20:50.888 Looking for network events
. 2010-07-06 18:20:50.951 Detected network event
. 2010-07-06 18:20:50.951 Enumerating network events for socket 472
. 2010-07-06 18:20:50.951 Enumerated 1 network events making 1 cumulative events for socket 472
. 2010-07-06 18:20:50.951 Handling network read event on socket 472 with error 0
. 2010-07-06 18:20:51.013 Selecting events 63 for socket 472
. 2010-07-06 18:20:51.013 Host key fingerprint is:
. 2010-07-06 18:20:51.013 ssh-rsa 2048 de:e2:29:05:c2:09:57:8d:b3:16:65:11:29:a7:1c:9e
. 2010-07-06 18:20:51.013 Initialised AES-256 SDCTR client->server encryption
. 2010-07-06 18:20:51.013 Initialised HMAC-SHA1 client->server MAC algorithm
. 2010-07-06 18:20:51.013 Initialised AES-256 SDCTR server->client encryption
. 2010-07-06 18:20:51.013 Initialised HMAC-SHA1 server->client MAC algorithm
. 2010-07-06 18:20:51.013 Waiting for the server to continue with the initialisation
. 2010-07-06 18:20:51.013 Looking for incoming data
. 2010-07-06 18:20:51.013 Looking for network events
. 2010-07-06 18:20:51.091 Detected network event
. 2010-07-06 18:20:51.357 Enumerating network events for socket 472
. 2010-07-06 18:20:51.357 Enumerated 1 network events making 1 cumulative events for socket 472
. 2010-07-06 18:20:51.357 Handling network read event on socket 472 with error 0
. 2010-07-06 18:20:51.357 Reading private key file "C:\BEAUK.1.ppk"
! 2010-07-06 18:20:51.357 Using username "NNNNNNN".
. 2010-07-06 18:20:51.357 Waiting for the server to continue with the initialisation
. 2010-07-06 18:20:51.357 Looking for incoming data
. 2010-07-06 18:20:51.357 Looking for network events
. 2010-07-06 18:20:51.373 Detected network event
. 2010-07-06 18:20:51.373 Enumerating network events for socket 472
. 2010-07-06 18:20:51.373 Enumerated 1 network events making 1 cumulative events for socket 472
. 2010-07-06 18:20:51.373 Handling network read event on socket 472 with error 0
. 2010-07-06 18:21:01.982 Offered public key
. 2010-07-06 18:21:01.982 Waiting for the server to continue with the initialisation
. 2010-07-06 18:21:01.982 Looking for incoming data
. 2010-07-06 18:21:01.982 Looking for network events
. 2010-07-06 18:21:01.998 Detected network event
. 2010-07-06 18:21:01.998 Enumerating network events for socket 472
. 2010-07-06 18:21:01.998 Enumerated 1 network events making 1 cumulative events for socket 472
. 2010-07-06 18:21:01.998 Handling network read event on socket 472 with error 0
. 2010-07-06 18:21:01.998 Remote debug message: Forced command: member
. 2010-07-06 18:21:01.998 Waiting for the server to continue with the initialisation
. 2010-07-06 18:21:01.998 Looking for incoming data
. 2010-07-06 18:21:01.998 Looking for network events
. 2010-07-06 18:21:02.170 Detected network event
. 2010-07-06 18:21:02.170 Enumerating network events for socket 472
. 2010-07-06 18:21:02.170 Enumerated 1 network events making 1 cumulative events for socket 472
. 2010-07-06 18:21:02.170 Handling network read event on socket 472 with error 0
. 2010-07-06 18:21:02.170 Offer of public key accepted
! 2010-07-06 18:21:02.170 Authenticating with public key "rsa-key-20100616"
. 2010-07-06 18:21:02.170 Prompt (2, SSH key passphrase, , Passphrase for key "rsa-key-20100616": )
. 2010-07-06 18:21:25.185 Waiting for the server to continue with the initialisation
. 2010-07-06 18:21:25.201 Looking for incoming data
. 2010-07-06 18:21:25.201 Looking for network events
. 2010-07-06 18:21:25.341 Detected network event
. 2010-07-06 18:21:25.341 Enumerating network events for socket 472
. 2010-07-06 18:21:25.341 Enumerated 1 network events making 1 cumulative events for socket 472
. 2010-07-06 18:21:25.341 Handling network read event on socket 472 with error 0
. 2010-07-06 18:21:25.341 Remote debug message: Forced command: member
. 2010-07-06 18:21:25.341 Waiting for the server to continue with the initialisation
. 2010-07-06 18:21:25.341 Looking for incoming data
. 2010-07-06 18:21:25.341 Looking for network events
. 2010-07-06 18:21:25.466 Detected network event
. 2010-07-06 18:21:25.654 Enumerating network events for socket 472
. 2010-07-06 18:21:25.654 Enumerated 1 network events making 1 cumulative events for socket 472
. 2010-07-06 18:21:25.654 Handling network read event on socket 472 with error 0
. 2010-07-06 18:21:25.654 Access granted
. 2010-07-06 18:21:25.654 Waiting for the server to continue with the initialisation
. 2010-07-06 18:21:25.654 Looking for incoming data
. 2010-07-06 18:21:25.654 Looking for network events
. 2010-07-06 18:21:25.654 Detected network event
. 2010-07-06 18:21:25.654 Enumerating network events for socket 472
. 2010-07-06 18:21:25.654 Enumerated 1 network events making 1 cumulative events for socket 472
. 2010-07-06 18:21:25.654 Handling network read event on socket 472 with error 0
. 2010-07-06 18:21:25.654 Opened channel for session
. 2010-07-06 18:21:25.654 Waiting for the server to continue with the initialisation
. 2010-07-06 18:21:25.654 Looking for incoming data
. 2010-07-06 18:21:25.654 Looking for network events
. 2010-07-06 18:21:25.685 Detected network event
. 2010-07-06 18:21:25.685 Enumerating network events for socket 472
. 2010-07-06 18:21:25.685 Enumerated 1 network events making 1 cumulative events for socket 472
. 2010-07-06 18:21:25.685 Handling network read event on socket 472 with error 0
. 2010-07-06 18:21:25.685 Started a shell/command
. 2010-07-06 18:21:25.685 --------------------------------------------------------------------------
. 2010-07-06 18:21:25.685 Using SFTP protocol.
. 2010-07-06 18:21:25.685 Doing startup conversation with host.
> 2010-07-06 18:21:25.685 Type: SSH_FXP_INIT, Size: 5, Number: -1
> 2010-07-06 18:21:25.685 01,00,00,00,05,
. 2010-07-06 18:21:25.685 Sent 9 bytes
. 2010-07-06 18:21:25.685 There are 0 bytes remaining in the send buffer
. 2010-07-06 18:21:25.685 Looking for network events
. 2010-07-06 18:21:25.685 Timeout waiting for network events
. 2010-07-06 18:21:25.685 Waiting for another 4 bytes
. 2010-07-06 18:21:25.685 Looking for incoming data
. 2010-07-06 18:21:25.685 Looking for network events
. 2010-07-06 18:21:25.701 Detected network event
. 2010-07-06 18:21:25.701 Enumerating network events for socket 472
. 2010-07-06 18:21:25.701 Enumerated 1 network events making 1 cumulative events for socket 472
. 2010-07-06 18:21:25.701 Handling network read event on socket 472 with error 0
. 2010-07-06 18:21:25.701 Server sent command exit status 1
. 2010-07-06 18:21:25.701 Selecting events 0 for socket 472
. 2010-07-06 18:21:25.701 Disconnected: All channels closed
* 2010-07-06 18:21:25.701 (ESshFatal) Connection has been unexpectedly closed. Server sent command exit status 1.
* 2010-07-06 18:21:25.701 Cannot initialize SFTP protocol. Is the host running a SFTP server?


The result is that I can't seem to connect. Can anyone help please?
martin

Re: (ESshFatal) Server unexpectedly closed

See possible reasons why you may get this error.
BrianWMorse

Thanks for the response, it appears that another user was testing with the incorret username and password and got our IP blocked for 24hours. All is well and great utility. Thanks again.
martin

Re: (ESshFatal) Server unexpectedly closed

Check (or ask your server administrator to check) the server's log file. You will hopefully find there reason for disconnecting.
BrianWMorse

(ESshFatal) Server unexpectedly closed

I am getting the following error message when I try to connect to a remote site via SFTP This was working fine until about mid day yesterday and now I get the following. I have confirmed we are not blocked on the firewall and that username and password are valid and can connect.

Any thoughts? Thanks

Brian

. 2008-05-08 14:05:21.263 --------------------------------------------------------------------------

. 2008-05-08 14:05:21.263 WinSCP Version 4.1.1 (Build 385) (OS 5.2.3790 Service Pack 2)
. 2008-05-08 14:05:21.263 Login time: Thursday, May 08, 2008 2:05:21 PM
. 2008-05-08 14:05:21.263 --------------------------------------------------------------------------
. 2008-05-08 14:05:21.263 Session name: xxx@ftp.companyname.com
. 2008-05-08 14:05:21.263 Host name: ftp.companyname.com (Port: 22)
. 2008-05-08 14:05:21.279 User name: xxx (Password: Yes, Key file: No)
. 2008-05-08 14:05:21.279 Tunnel: No
. 2008-05-08 14:05:21.279 Transfer Protocol: SFTP (SCP)
. 2008-05-08 14:05:21.279 Ping type: -, Ping interval: 30 sec; Timeout: 15 sec
. 2008-05-08 14:05:21.279 Proxy: none
. 2008-05-08 14:05:21.279 SSH protocol version: 2; Compression: No
. 2008-05-08 14:05:21.279 Bypass authentication: No
. 2008-05-08 14:05:21.279 Try agent: Yes; Agent forwarding: No; TIS/CryptoCard: No; KI: Yes; GSSAPI: No
. 2008-05-08 14:05:21.279 Ciphers: aes,blowfish,3des,WARN,arcfour,des; Ssh2DES: No
. 2008-05-08 14:05:21.279 SSH Bugs: -,-,-,-,-,-,-,-
. 2008-05-08 14:05:21.279 SFTP Bugs: -,-
. 2008-05-08 14:05:21.279 Return code variable: Autodetect; Lookup user groups: Yes
. 2008-05-08 14:05:21.279 Shell: default, EOL: 0
. 2008-05-08 14:05:21.279 Clear aliases: Yes, Unset nat.vars: Yes, Resolve symlinks: Yes
. 2008-05-08 14:05:21.279 LS: ls -la, Ign LS warn: Yes, Scp1 Comp: No
. 2008-05-08 14:05:21.279 Local directory: default, Remote directory: home, Update: No, Cache: Yes
. 2008-05-08 14:05:21.279 Cache directory changes: Yes, Permanent: Yes
. 2008-05-08 14:05:21.279 DST mode: 1
. 2008-05-08 14:05:21.279 --------------------------------------------------------------------------
. 2008-05-08 14:05:21.357 Looking up host "ftp.companyname.com"
. 2008-05-08 14:05:21.388 Connecting to XXX.XXX.XXX.XXX port 22
. 2008-05-08 14:05:21.435 Selecting events 63 for socket 696
. 2008-05-08 14:05:21.435 Waiting for the server to continue with the initialisation
. 2008-05-08 14:05:21.435 Looking for incoming data
. 2008-05-08 14:05:21.435 Looking for network events
. 2008-05-08 14:05:21.435 Detected network event
. 2008-05-08 14:05:21.435 Enumerating network events for socket 696
. 2008-05-08 14:05:21.435 Enumerated 18 network events making 18 cumulative events for socket 696
. 2008-05-08 14:05:21.435 Handling network write event on socket 696 with error 0
. 2008-05-08 14:05:21.435 Handling network connect event on socket 696 with error 0
. 2008-05-08 14:05:21.435 Looking for network events
. 2008-05-08 14:05:26.466 Detected network event
. 2008-05-08 14:05:26.466 Enumerating network events for socket 696
. 2008-05-08 14:05:26.466 Enumerated 32 network events making 32 cumulative events for socket 696
. 2008-05-08 14:05:26.466 Handling network close event on socket 696 with error 0
. 2008-05-08 14:05:26.466 Selecting events 0 for socket 696
. 2008-05-08 14:05:26.466 Server unexpectedly closed network connection
* 2008-05-08 14:05:26.482 (ESshFatal) Server unexpectedly closed network connection.