login about faq
            DllDate: May  8 2015      

UnlockPrefix: ***

* Architecture: Little Endian; 32-bit

Language: .NET 2.0
VerboseLogging: 0
SftpVersion: 0
**** port: 22
Established TCP/IP connection with SSH server
clientIdentifier: SSH-2.0-PuTTY_Release_0.63
Sending client identifier...
Done sending client identifier.
Reading server version...
WindowsError: An established connection was aborted by the software in your host machine.
WindowsErrorCode: 0x2745
numBytesRequested: 1
Failed to receive data on the TCP socket
Failed to read initial server version string
--sshConnect Failed.

asked Nov 19 '15 at 07:16

Narasimhan's gravatar image


This error:

WindowsError: An established connection was aborted by the software in your host machine.
WindowsErrorCode: 0x2745 

Is caused by the following sequence of events, which could apply to any protocol (SMTP, HTTP, IMAP, FTP, SSH, SFTP, etc.)

  1. The client sends something to the server.
  2. The server dislikes what it receives, for whatever reason, and decides to close the connection.
  3. The client then attempts to read the connection -- and it finds the connection has already been closed. Thus the message ("An established connection was aborted by the software in your host machine.")

When the server decided to close the connection, the its TCP "close" socket operation results in a "FIN" segment being sent to its peer (the client). The Windows OS receives it and thus the connection becomes closed. The next time the application tries to read/write the connection, it finds it's already been closed.

To debug a problem such as this, the question becomes: "What was wrong with the last message sent to the server? Was it properly formatted (i.e. was the client software working correctly?), or was the message formatted properly, but the contents of the message were unacceptable?" With Chilkat, it is far more likely that the latter is the cause.

One way to find out why the SSH server is closing the connection, is to run the SSH server with verbose/debug logging, and run it interactively for the test. For example, assuming the SSH server is on a Linux box, go to that box and stop the SSH server ("sudo kill -9 <pid>")

Then start sshd interactively as shown below. You may have to give the full path to the sshd..

sudo /home/chilkat/openssh-7.1p1/sshd -Dde

You should see verbose/debug logging from sshd emitted to the output. Then run your app. You should see the sshd receive the connection -- and if it dislikes something, you should see the sshd's debug logging to the stdout giving some details as to why it disconnects the client.


answered Nov 20 '15 at 09:19

chilkat's gravatar image

chilkat ♦♦

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or __italic__
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported



Asked: Nov 19 '15 at 07:16

Seen: 785 times

Last updated: Nov 20 '15 at 09:19

powered by OSQA