Archived Forum Post

Index of archived forum posts

Question:

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

Oct 05 '12 at 08:46

The Ssh.Connect method fails and when I examine the LastErrorText, I see the error:

An established connection was aborted by the software in your host machine.
What is wrong?


Answer

An SSH connection is established as follows:

  1. A TCP/IP socket connection is established.
  2. The client-side sends a "client identifier" message, and at the same time the server sends a similar message (to indicate the server's version).
  3. The key exchange negotiation now begins with each side sending a "KEX_INIT" message that indicates what algorithms are supported.
  4. The back-and-forth exchange continues until the keys are established for the connection and the secure channel is established.

The "An established connection was aborted by the software in your host machine." is caused by the following:

The TCP/IP connection is established without problem. The back-and-forth negotiation begins. However, at some point the server decides, for some unknown reason, that it's simply going to drop the connection. This can happen while the client is still sending data on the connection, and the client happily continues to do so. Then, when the client attempts to read the next server response, it fails with the error. Unfortunately, there is no information available to the client to understand WHY the server decided to disconnect. The only possible source of information would be to examine the server-side logs for more information.

The "An established connection was aborted by the software in your host machine." error can happen in virtually any Internet protocol (HTTP, SSH, FTP, POP3, SMTP, etc.) See this web page for more information: http://www.chilkatsoft.com/p/p_299.asp