0 votes
by (180 points)
edited

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
by (148k points)
edited

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?

by (180 points)
edited

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.

by (260 points)
edited

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

by (148k points)
edited

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.

by (148k points)
edited

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

by (180 points)
edited

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

1 Answer

0 votes
by (148k points)

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

...