Renci.SSH Error in VB.Net, Getting Renci.SshNet.Common.SshConnectionException: An established connection was aborted by the server.

Đang mở
#1,569 3 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
20/100
Loại issue
Lỗi
Độ rõ ràng
Cần làm rõ
Mức độ hoạt động
Đình trệ
Công nghệ
csharp
Lĩnh vực
networking, security

Hướng nghiên cứu

Bắt đầu bằng cách tái hiện kết nối bằng SSH.NET 2020.0.1 tới OpenSSH_9.2p1 trên Debian, sau đó xem lại debug trace được cung cấp xung quanh KeyExchangeDhGroupExchangeRequest. So sánh hành vi này với kết nối Tera Term thành công; công việc được xem là hoàn tất khi xác định được nguyên nhân có thể tái hiện và một bản sửa được hỗ trợ hoặc một giới hạn đã được ghi nhận.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Attempts to connect to a server using Renci.SSH result in an exception.

The device can be accessed usingTeraterm.

.Net gives this exception:
Renci.SshNet.Common.SshConnectionException: An established connection was aborted by the server.
at Renci.SshNet.Session.WaitOnHandle(WaitHandle waitHandle, TimeSpan timeout)
at Renci.SshNet.Session.WaitOnHandle(WaitHandle waitHandle)
at Renci.SshNet.Session.Connect()
at Renci.SshNet.BaseClient.CreateAndConnectSession()
at Renci.SshNet.BaseClient.Connect()

This is the output from Debug:
SshNet.Logging Verbose: 1 : Initiating connection to '<my_ip_addr>:22'.
SshNet.Logging Verbose: 1 : Server version '2.0' on 'OpenSSH_9.2p1 Debian-2+deb12u3'.
SshNet.Logging Verbose: 5 : [] Received message 'KeyExchangeInitMessage' from server: 'SSH_MSG_KEXINIT'.
SshNet.Logging Verbose: 5 : [] Sending message 'KeyExchangeInitMessage' to server: 'SSH_MSG_KEXINIT'.
SshNet.Logging Verbose: 5 : [] Sending message 'KeyExchangeDhGroupExchangeRequest' to server: 'SSH_MSG_KEX_DH_GEX_REQUEST'.
SshNet.Logging Verbose: 5 : [] Raised exception: Renci.SshNet.Common.SshConnectionException: An established connection was aborted by the server.
SshNet.Logging Verbose: 1 : [] Disposing session.
SshNet.Logging Verbose: 1 : [] Disconnecting session.
SshNet.Logging Verbose: 1 : [] Shutting down socket.
SshNet.Logging Verbose: 1 : [] Disposing socket.
SshNet.Logging Verbose: 1 : [] Disposed socket.
SshNet.Logging Verbose: 5 : [] Disconnecting after exception: Renci.SshNet.Common.SshConnectionException: An established connection was aborted by the server.
at Renci.SshNet.Session.WaitOnHandle(WaitHandle waitHandle, TimeSpan timeout)
at Renci.SshNet.Session.WaitOnHandle(WaitHandle waitHandle)
at Renci.SshNet.Session.Connect()
at Renci.SshNet.BaseClient.CreateAndConnectSession()
Exception thrown: 'Renci.SshNet.Common.SshConnectionException' in Renci.SshNet.dll

Here is some version info:
Renci.SshNet, Version=2020.0.1.0
Microsoft Visual Studio Professional 2022 (64-bit) - Current Version 17.10.1

It looks like my server did not like the key exchange request.

In Teraterm, it says "The server's host key fingerprint is: Fingerprint hash algorithm SHA256" then shows the hash.

Does anyone have any ideas that I could try? Is there any other information I could provide in helping find a solution?

Ngôn ngữ chính
C#
Star
4.4k
Fork
993
Merge trung bình
9 ngày 21 giờ
Pull request đã merge (30 ngày)
1

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của sshnet/SSH.NET

Tất cả issue của sshnet/SSH.NET

Issue tương tự

Thêm issue về C#

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.