An established connection was aborted by the software in your host machine

0 votes
asked Mar 5, 2012 by patibandha (180 points)
edited Jul 4, 2012

hi

when i am trying to delete files from SFTP server it is giving me error.

following is the log detail

2012-03-05 11:24:21.941 INFO Sftp(3) Response: SSH_FXP_ATTRS (3)
2012-03-05 11:24:21.941 INFO (0) COMMAND: Response: SSH_FXP_ATTRS (3)
2012-03-05 11:24:21.945 INFO (0) COMMAND: Command: SSH_FXP_READ (4, 0x31, 0, 28672)
2012-03-05 11:24:21.945 INFO (0) COMMAND: Command: SSH_FXP_READ (5, 0x31, 28672, 28672)
2012-03-05 11:24:21.945 INFO (0) COMMAND: Command: SSH_FXP_READ (6, 0x31, 57344, 28672)
2012-03-05 11:24:21.945 INFO (0) COMMAND: Command: SSH_FXP_READ (7, 0x31, 86016, 28672)
2012-03-05 11:24:22.061 INFO Sftp(3) Response: SSH_FXP_STATUS (4, 1, 'EOF')
2012-03-05 11:24:22.061 INFO (0) COMMAND: Response: SSH_FXP_STATUS (4, 1, 'EOF')
2012-03-05 11:24:22.061 INFO Sftp(3) Response: SSH_FXP_STATUS (5, 1, 'EOF')
2012-03-05 11:24:22.061 INFO (0) COMMAND: Response: SSH_FXP_STATUS (5, 1, 'EOF')
2012-03-05 11:24:22.061 INFO Sftp(3) Response: SSH_FXP_STATUS (6, 1, 'EOF')
2012-03-05 11:24:22.061 INFO (0) COMMAND: Response: SSH_FXP_STATUS (6, 1, 'EOF')
2012-03-05 11:24:22.061 INFO Sftp(3) Response: SSH_FXP_STATUS (7, 1, 'EOF')
2012-03-05 11:24:22.061 INFO (0) COMMAND: Response: SSH_FXP_STATUS (7, 1, 'EOF')
2012-03-05 11:24:22.061 INFO Sftp(3) Command: SSH_FXP_CLOSE (8, 0x31)
2012-03-05 11:24:22.061 INFO (0) COMMAND: Command: SSH_FXP_CLOSE (8, 0x31)
2012-03-05 11:24:22.202 INFO Sftp(3) Response: SSH_FXP_STATUS (8, 0, 'Ok')
2012-03-05 11:24:22.202 INFO (0) COMMAND: Response: SSH_FXP_STATUS (8, 0, 'Ok')
2012-03-05 11:24:22.250 INFO Sftp(5) Info: Connecting to 62.254.226.169:22 using Sftp 2.0.4086.0.
2012-03-05 11:24:22.573 ERROR Sftp(5) SSH: System.Net.Sockets.SocketException: An established connection was aborted by the software in your host machine
   at Rebex.Net.SshSession.bOtYJuZ()
   at Rebex.Net.SshSession.Negotiate()
2012-03-05 11:24:22.587 ERROR Sftp(5) Info: System.Net.Sockets.SocketException: An established connection was aborted by the software in your host machine
   at Rebex.Net.SshSession.bOtYJuZ()
   at Rebex.Net.SshSession.Negotiate()
   at Rebex.Net.Sftp.Connect(String serverName, Int32 serverPort, SshParameters parameters)

i found the following artical "http://forum.rebex.net/questions/242/getlist-throws-an-established-connection-was-aborted-by-the-software-in-your-host-machine-exceptionm" but how to change passive mode for SFTP.

but not sure this will help me in my problem or not. many thanks.

Applies to: Rebex SFTP
commented Mar 5, 2012 by Lukas Pokorny (96,150 points)
edited Mar 5, 2012

Hello, the article you found is not related to SFTP. It's related to FTP protocol's data connection, but there is no such concept in SFTP.

The error you got indicates that the connection to the server was established, but it failed even before actual SSH negotiation took place. Are you able to connect to the server at 62.254.226.169:22 using WinSCP or other SFTP/SSH client?

commented Mar 6, 2012 by patibandha (180 points)
edited Mar 6, 2012

yes i can connect to sftp using WinSCP and even test application of Rebex and even able to delete the file also.. using that app.

commented Mar 6, 2012 by MerliN (260 points)
edited Mar 6, 2012

I guess this is caused by some firewall/antivirus software.

commented Mar 6, 2012 by Lukas Pokorny (96,150 points)
edited Mar 6, 2012

MerlinN might be right. If you are indeed able to connect from one application (using Rebex SFTP) but unable to connect using another application (using Rebex SFTP as well), even though both actually connect to the same server using the same DLLs, a firewall check is definitely recommended.

commented Mar 6, 2012 by Lukas Pokorny (96,150 points)
edited Mar 6, 2012

If you recompile the WinFormClient sample (the sample source code comes with Rebex SFTP package), are you able to connect with that?

commented Mar 7, 2012 by patibandha (180 points)
edited Mar 7, 2012

yes after recompile i am able to connect using WinFormclient sample app.

1 Answer

0 votes
answered Mar 8, 2012 by Lukas Pokorny (96,150 points)

This was most likely a local firewall configuration issue - see the comments above for details.

...