-
-
Notifications
You must be signed in to change notification settings - Fork 906
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Key Exchange Negotiation Failed #1296
Comments
Could you describe what server you are connecting to and what version. What type of device is this? Can you connect to your server using the command line command with option Check whether the log does not contain sensitive information and paste it here. |
Hi @WojciechNagorski,
|
The error could indicate that |
@Rob-Hague Yes, I did try that. It seems that there isn't an issue with the HostKey validation and e.CanTrust is indeed set to true before going back to .Connect() call. I should have also mentioned in the main post, but the same SFTP configuration work with a winscp client, so we know that the config isn't an issue. |
OK, unfortunately it's not easy from this point in. It sounds like the signature validation could be failing. You might be able to confirm that with a debug build and stepping through Alternatively if the server is internet-facing and you were willing to share the IP address/hostname, someone else could try that if they have time (it is failing before authentication happens so it does not require login details) |
Hi Folks,
I am using the latest NuGet package - 2023.0.1 in a .NET 6 console app. Below is the stack trace.
Code:
Stack Trace:
Renci.SshNet.Common.SshConnectionException
HResult=0x80131500
Message=Key exchange negotiation failed.
Source=Renci.SshNet
StackTrace:
at Renci.SshNet.Security.KeyExchange.Finish()
at Renci.SshNet.Security.KeyExchangeECDH.Finish()
at Renci.SshNet.Session.MessageListener()
--- End of stack trace from previous location ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at Renci.SshNet.Session.WaitOnHandle(WaitHandle waitHandle, TimeSpan timeout)
at Renci.SshNet.Session.Connect()
at Renci.SshNet.BaseClient.CreateAndConnectSession()
at Renci.SshNet.BaseClient.Connect()
Is there anything I can do to workaround this issue? Thank you!
EDIT:
To add to the scenario, I have no issues connecting and uploading using a WinSCP client with the same configuration used above.
The text was updated successfully, but these errors were encountered: