sshnet / sshnet/SSH.NET

An established connection was aborted by the server

Open
#724 29 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C#
Stars
4.4k
Forks
993
Avg merge
9d 21h
Merged PRs (30d)
1

Description

i am using Renci SSH.Net to do ssh connection, most of my connections done successfully and no issue
but now i have an issue connecting to server
i am getting An established connection was aborted by the server

the below is the simple code i used

using (var client = new SshClient(Host, 22, Username, Password))
{
client.Connect();
// the exception raise here
var result = client.RunCommand(" show ver ");
client.Disconnect();
}
i asked the server admin for the log and he sent to me the below log result from the server :

Sep 7 17:21:21.228 [GENERAL] [ERROR] SSH_input_control[0]: key exchange failed for instance: 4568 status: -5904
Sep 7 17:21:21.228 [GENERAL] [] SSH_input_control[0]: connection id: 0 exiting...
Sep 7 17:21:21.228 [GENERAL] [ERROR] SSH_cleanup[0]: SSH/SFTP: unverified session terminated

appreciate your support

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Begin with SshClient.Connect() and the server's key exchange log; determine whether the failure is reproducible and whether it points to a library change or server configuration. The report specifies no requested code change or success condition, so a completed fix cannot be defined from the issue alone.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
networking
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.