Skip to content
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

Server identification problem in NETStandart 2.0 #377

Closed
Kutikov opened this issue Jan 21, 2018 · 55 comments
Closed

Server identification problem in NETStandart 2.0 #377

Kutikov opened this issue Jan 21, 2018 · 55 comments
Assignees

Comments

@Kutikov
Copy link

Kutikov commented Jan 21, 2018

Renci.SshNet.Common.SshConnectionException: "Server response does not contain SSH protocol identification." - VS 2017, causes only using UWP with NETStandart 2.0, but on UWP with NETCore there were no problems. After 2,5 hours of testing I`ve found out that problem is in timeouts of Session/ Could you fix it up?

@drieseng
Copy link
Member

Can you provide more information? Do you have a small application (source) that allows me to reproduce this issue?

What version of SSH.NET are you using?

@Kutikov
Copy link
Author

Kutikov commented Jan 21, 2018

I've got small server and I'm trying to access using code:
SshClient sshClient = new SshClient(host, account, password); sshClient.Connect():
While minTarget version was 10.240, all works like a charm, but for using dotnetzip library I've changed minTarget version to FallCreatorsUpdate. As a result your library switchs from UAP10 version to NET 4.6.1 version and begins to reproduce this error. I haven't managed to debug your code, but I've found, that in Connect method in Session.cs there is some lines, that checks Ssh version after timeout. Maybe probleme placed there. You can reproduce that buf itself, using that code below and switching minTarget platform in UWP C# application in VS2017. It's important not to catch Renci.SshNet.Common.SshConnectionException and try to connect.

I use 2016.1.0 version.

@drieseng
Copy link
Member

Why do you mention .NET Standard 2.0 in the issue? We do not yet ship a .NET Standard 2.0 version.
Did you mean .NET Standard 1.3?

@theescapers
Copy link

I am experiencing this issue too, I'm using 2016.1.0 from NuGet, and building a UWP app against Fall Creators Update. I get failed SFTP connections on both my Linux server and Mac server. Both work fine with my other SFTP clients.

Version 2013.4.7 from NuGet doesn't have the problem, but I don't really want to drop back to such and old version.

@Kutikov
Copy link
Author

Kutikov commented Jan 22, 2018

Sorry, maybe I made a mistake and an issue caused by .NET Standart 1.3. Could you reproduce this issue?

@Kutikov
Copy link
Author

Kutikov commented Jan 22, 2018

For me version 2013.4.7 produced Renci.SshNet.Common.SshConnectionException: "An established connection was aborted by the software in your host machine."
Is there any way to make UAP only library to fix isssue NU1701 Package 'SSH.NET 2016.1.0' was restored using '.NETFramework,Version=v4.6.1' instead the project target framework '.NETCoreApp,Version=v2.0'. This may cause compatibility problems.

@drieseng
Copy link
Member

@Kutikov Won't have time today. I'll try to test it tomorrow.

@Kutikov
Copy link
Author

Kutikov commented Jan 25, 2018

So is it any progress? If you don`t find out issue now, could you please build separated .NETCore SSH.NET for us to using it, while this issue would be fixed?

@drieseng
Copy link
Member

Sorry too busy at work. Hope to have time this weekend.

@lyzl
Copy link

lyzl commented Feb 2, 2018

I have encontered the same issue when connect sshclient, it throwing the exception:
Server response does not contain SSH protocol identification
my environment is:
Windows10 Fall Creators Update (Build 16299) SDK
VS2017
SSH.NET v2016.1.0
So what I found the problems is:
In Fall Creators Update and VS2017, the new UWP project will use .NETCore 2.0, which not be supported in current version.
You can try:
Downgrade the Microsoft.NETCore.UniversalWindowsPlatform in nugget package control panel from 6.x to 5.x. Which will use .NETCore 1.7 or eariler.
@theescapers

@stuwilliams-clgx
Copy link

"Server response does not contain SSH protocol identification"

Connecting from:

  • Server 2012
  • .NET CLR 4.6.1

I connect to my linux s/FTP servers fine but when attempting to connect to:

  • Server 2008r2
  • Windows s/FTP server

I am using simple username + password authentication.

Is there some setting or code snippet that I can use to force compatibility?

I found the message in source in session.cs [612], is there a possible variation in the RegEx that should be considered?

@darkoperator
Copy link

darkoperator commented Mar 26, 2018 via email

@KWinston
Copy link

KWinston commented Apr 7, 2018

@lyzl Was looking for a fix for a while and downgrading worked great to get it working on Build 16299, thanks!

@drieseng
Copy link
Member

@Kutikov @theescapers @lyzl Can any of you still consistently reproduce this issue?

@Kutikov
Copy link
Author

Kutikov commented Jul 23, 2018

@drieseng, at this moment I can't check up functionality due to not using UWP and .NET Standart 1.3

@doodz
Copy link

doodz commented Aug 31, 2018

hello,
@drieseng , I reproduce.
UWP project with XAMARIN.FORMS
WINDOWS 10,Version 1803 (10.0 ; Build 17134)
.NET Standard 2.0 ,
NuGet SSH.NET v2016.1.0

@rducom
Copy link

rducom commented Sep 10, 2018

I reproduce on 10% of our integration builds. Not consistently
NetCore 2.1 on win10 & server2016
Last ssh.net nuget version + Syncplify server

@tipa
Copy link

tipa commented Oct 1, 2018

Experiencing the same issue in my UWP app. It works when I have set build 10240/14393/15063 as min target version and it stops working as soon as I set the min target version to build 16299/17134.

@mbuchok
Copy link

mbuchok commented Oct 24, 2018

Also receiving this error in .NET Core 2.1 on CentOS. Doesn't happen on all sftp connections... just one that I know of so far. Will see if I can gather some useful details later.

@nick-goloborodko
Copy link

Experiencing this issue too in UWP app on Windows IoT Core on raspberry pi 3 model b - and unfortunately, it is occurs in the critical function of the project

@doodz
Copy link

doodz commented Nov 15, 2018

while waiting for a solution I use:
https://github.com/asmodat/Asmodat-Standard-SSH.NET
He corrected the problem.

@darkoperator
Copy link

darkoperator commented Nov 15, 2018 via email

@doodz
Copy link

doodz commented Nov 15, 2018

For me, this is not the best alternative in the long run.
As I said, waiting for the correction, it could help @ nick-goloborodko in the medium term.

@drieseng
Copy link
Member

Do any of you have a server I can reproduce this issue again?

@avboivin
Copy link

@drieseng I sent you an email with my contact informations. I will be able to show you my configuration which is having this issue.

@avboivin
Copy link

After validating, it seems this issue is caused by the SFTP server actively refusing the connection using either a firewall rule or some sort of IP-based blocking.

This is not an issue caused by SSH.NET but rather by the connectivity to your SFTP server.

@drieseng
Copy link
Member

@doodz @Kutikov @theescapers Can any of you consistently reproduce this issue, and provide me access to one of the (test) servers that show this issue?

@doodz
Copy link

doodz commented Nov 20, 2018

hello @drieseng sorry for the late.
What you want say for server?
I'm use a vm in local and use my personal computer for start ssh session with ssh.net.
You want an access of my vm in ssh ?

@lprofitt
Copy link

lprofitt commented Jan 10, 2019

I am having this problem with Iot Core, but only when using the loop back address in my UWP app. I use the loop back to run system commands outside of the app sandbox.

NOTE: I've not done a complete code analysis, this is just what I came up with after stepping through the code a few times.

I believe that it has something to do with the loop back connection being much faster than than the remote connection, but I'm not certain.

E.g. If I step through the code, and get the point that is highlighted in the below image, I get an unhanded object disposed : Safe handle has been closed exception.

image

I'm not sure why it only does it when I step through the code, but I suspect that, since the SendCompleted callback is called by each async call to Send, the threads are stomping on each other, since there is no lock mechanism, hence the "object disposed exception."

image

Anyway, I notice that the cause of the error is that when verifying the server version, there are no bytes returned. However, if you modify theSocketAbstraction.Readmethod as such:

image

It returns the correct number of bytes read.

You would also need to modify all other instances of the "sendReceiveToken.TotalBytesTransferred" for determining the number of bytes read.

However, rather than modifying the code, which seems risky to me since I don't know what kind of regression that might cause, I chose to define the FEATURE_SOCKET_SYNC compiler define at the top of the SocketAbstraction.cs file. This made it work for me.

In my calling code I run a SSH command like this with a timeout:

image

@estebanz01
Copy link

I'm also seeing Exception: Server response does not contain SSH protocol identification.: Renci.SshNet: at Renci.SshNet.Session.Connect() while running on AWS Lambda. It is inconsistent.

.NET version: Core 2.1
Language: C#
Environment: Probably Amazon Linux.

The function tries to connect to the same server multiple times, each attempt with a different user/pass combination and performs some operations on dirs and files.

This is a snippet of the code that randomly raise this error:

private void ProcessDirectories(string process_path, ref SftpClient sftp)
{
     try
     {
         if (!sftp.IsConnected)
         {
            sftp.Connect(); // <-- It fails here
        }

        if (!Directory.Exists(process_path + "/processed"))
        {
           Directory.CreateDirectory(process_path + "/processed");
        }

        DirectoryInfo directory = new DirectoryInfo(process_path);
        ... // More data processing
    }
}

maybe there's an issue with passing the SftpClient object as a reference?

@erik-wramner
Copy link

We are also seeing this with .NET Core 2.2 and C# in Azure. It is fairly consistent; it happens with some servers and not with others. Unfortunately only in production, so I can't provide a test server. I will be happy to help testing a fix though.

@lprofitt did you create a fork? Ideally I'd like to change the calling code that I control rather than code in the library itself unless the official library can be fixed.

@lprofitt
Copy link

@erik-wramner, I did not create a fork, I just modified my local copy.

@M1XGear
Copy link

M1XGear commented Sep 18, 2019

Any updates on solving this?

@Ashetyn
Copy link

Ashetyn commented Nov 1, 2019

I'm receiving this issue as well. any updates/ quick fixes?

@lprofitt
Copy link

lprofitt commented Nov 1, 2019

@M1XGear and @Ashetyn,
Pull the whole project down, and define the FEATURE_SOCKET_SYNC compiler define at the top of the SocketAbstraction.cs file and, it to your solution, and reference that rather than using nuget.

@EddyRts
Copy link

EddyRts commented Feb 7, 2020

I'm also seeing this Exception a few times a day in our production environment:
Renci.SshNet.Common.SshConnectionException: Server response does not contain SSH protocol identification.
at Renci.SshNet.Session.Connect()
at Renci.SshNet.BaseClient.Connect()

SSH.NET version: NuGet 2016.1.0.0
.NET version: .NET framework 4.7.2
Environment: Windows Server 2019
Language: C#

@natalie-o-perret
Copy link

Also experiencing that issue on our side

@KhalilMohammad
Copy link

Working fine locally in windows 10 but throwing exception in azure function app.

@zerathun
Copy link

I had the same issues. I started to try using other solutions on NUGET. Actually a Fork from Renci/SSH.NET solved this problem if anyone still is having issues.
https://www.nuget.org/packages/SSH.NET.Fork/2018.8.25.2?_src=template
With that Package my SSH Connection works just fine with UWP/Xamarin etc..

@drieseng
Copy link
Member

I've identified a bug in our EAP socket implementation that surfaces when an async operation completes synchronously.

@karthikvr1990
Copy link

I am getting ""Server response does not contain SSH protocol identification" consistently.
UWP project
WINDOWS 10,Version 1803 (10.0 ; Build 17134)
.NET Standard 2.0 ,
NuGet SSH.NET v2016.1.0

I am trying to ssh to a hardware in my LAN. Putty ssh works.
Is there any update fix?

@dudi-dev
Copy link

dudi-dev commented Apr 6, 2020

I have the same issue using SSH.NET within my Azure Function deployed to Microsoft Azure. I use this library to check each minute for new files to download them and move them to another folder (just small text files).

It works for about 1-3 days and then it stops working until I stop and start the Function again.

I'm using SSH.NET version 2016.1.0 in my .NET Core 3.1 project.

Maybe this information helps resolving the issue.

"Just my code" stack trace:
Microsoft.Azure.WebJobs.Host.FunctionInvocationException: at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e) at Microsoft.Azure.WebJobs.Host.Executors.FunctionExecutor+<ExecuteWithLoggingAsync>d__19.MoveNext (Microsoft.Azure.WebJobs.Host, Version=3.0.16.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35Microsoft.Azure.WebJobs.Host, Version=3.0.16.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35: C:\projects\azure-webjobs-sdk-rqm4t\src\Microsoft.Azure.WebJobs.Host\Executors\FunctionExecutor.csMicrosoft.Azure.WebJobs.Host, Version=3.0.16.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35: 322) at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e) at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e) at System.Runtime.CompilerServices.TaskAwaiter1.GetResult (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at Microsoft.Azure.WebJobs.Host.Executors.FunctionExecutor+d__16.MoveNext (Microsoft.Azure.WebJobs.Host, Version=3.0.16.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35Microsoft.Azure.WebJobs.Host, Version=3.0.16.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35: C:\projects\azure-webjobs-sdk-rqm4t\src\Microsoft.Azure.WebJobs.Host\Executors\FunctionExecutor.csMicrosoft.Azure.WebJobs.Host, Version=3.0.16.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35: 117)
Inner exception Renci.SshNet.Common.SshConnectionException handled at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw:
at Renci.SshNet.Session.Connect (Renci.SshNet, Version=2016.1.0.0, Culture=neutral, PublicKeyToken=1cee9f8bde3db106)
at Renci.SshNet.BaseClient.Connect (Renci.SshNet, Version=2016.1.0.0, Culture=neutral, PublicKeyToken=1cee9f8bde3db106)
at MyNamespace.MyClass.Receive (MyNamespace, Version=1.0.0.0, Culture=neutral, PublicKeyToken=nullMyNamespace, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null: C:\MySourcecontrol\Functions\MyNamespace\MyClass.csMyNamespace, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null: 40)
at MyNamespace.MyClass.Run (MyNamespace, Version=1.0.0.0, Culture=neutral, PublicKeyToken=nullMyNamespace, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null: C:\MySourcecontrol\Functions\MyNamespace\MyClass.csMyNamespace, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null: 29)
at lambda_method (Anonymously Hosted DynamicMethods Assembly, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null)
at Microsoft.Azure.WebJobs.Host.Executors.VoidMethodInvoker2.InvokeAsync (Microsoft.Azure.WebJobs.Host, Version=3.0.16.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35Microsoft.Azure.WebJobs.Host, Version=3.0.16.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35: C:\projects\azure-webjobs-sdk-rqm4t\src\Microsoft.Azure.WebJobs.Host\Executors\VoidMethodInvoker.csMicrosoft.Azure.WebJobs.Host, Version=3.0.16.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35: 20) at Microsoft.Azure.WebJobs.Host.Executors.FunctionInvoker2+d__10.MoveNext (Microsoft.Azure.WebJobs.Host, Version=3.0.16.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35Microsoft.Azure.WebJobs.Host, Version=3.0.16.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35: C:\projects\azure-webjobs-sdk-rqm4t\src\Microsoft.Azure.WebJobs.Host\Executors\FunctionInvoker.csMicrosoft.Azure.WebJobs.Host, Version=3.0.16.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35: 52)
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at System.Runtime.CompilerServices.TaskAwaiter1.GetResult (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e) at Microsoft.Azure.WebJobs.Host.Executors.FunctionExecutor+<InvokeAsync>d__27.MoveNext (Microsoft.Azure.WebJobs.Host, Version=3.0.16.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35Microsoft.Azure.WebJobs.Host, Version=3.0.16.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35: C:\projects\azure-webjobs-sdk-rqm4t\src\Microsoft.Azure.WebJobs.Host\Executors\FunctionExecutor.csMicrosoft.Azure.WebJobs.Host, Version=3.0.16.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35: 585) at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e) at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e) at System.Runtime.CompilerServices.TaskAwaiter.GetResult (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e) at Microsoft.Azure.WebJobs.Host.Executors.FunctionExecutor+<ExecuteWithWatchersAsync>d__26.MoveNext (Microsoft.Azure.WebJobs.Host, Version=3.0.16.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35Microsoft.Azure.WebJobs.Host, Version=3.0.16.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35: C:\projects\azure-webjobs-sdk-rqm4t\src\Microsoft.Azure.WebJobs.Host\Executors\FunctionExecutor.csMicrosoft.Azure.WebJobs.Host, Version=3.0.16.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35: 532) at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e) at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e) at System.Runtime.CompilerServices.TaskAwaiter.GetResult (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e) at Microsoft.Azure.WebJobs.Host.Executors.FunctionExecutor+<ExecuteWithLoggingAsync>d__25.MoveNext (Microsoft.Azure.WebJobs.Host, Version=3.0.16.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35Microsoft.Azure.WebJobs.Host, Version=3.0.16.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35: C:\projects\azure-webjobs-sdk-rqm4t\src\Microsoft.Azure.WebJobs.Host\Executors\FunctionExecutor.csMicrosoft.Azure.WebJobs.Host, Version=3.0.16.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35: 468) at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e) at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e) at System.Runtime.CompilerServices.TaskAwaiter.GetResult (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e) at Microsoft.Azure.WebJobs.Host.Executors.FunctionExecutor+<ExecuteWithLoggingAsync>d__19.MoveNext (Microsoft.Azure.WebJobs.Host, Version=3.0.16.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35Microsoft.Azure.WebJobs.Host, Version=3.0.16.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35: C:\projects\azure-webjobs-sdk-rqm4t\src\Microsoft.Azure.WebJobs.Host\Executors\FunctionExecutor.csMicrosoft.Azure.WebJobs.Host, Version=3.0.16.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35: 278)

@drieseng drieseng added this to the 2020.0.0-beta1 milestone Apr 26, 2020
@drieseng drieseng self-assigned this May 3, 2020
@drieseng
Copy link
Member

drieseng commented May 3, 2020

Fixed in 916c019.

@drieseng drieseng closed this as completed May 3, 2020
@fnicollier
Copy link

fnicollier commented May 25, 2020

I've tried a build using the source code from May 3rd 2020 which has this fix but I still get the same issue when running on Azure Function: works fine for a day and then "Server response does not contain SSH".

Using .NET Core 3.1 on Azure Function v3.

@drieseng
Copy link
Member

drieseng commented May 25, 2020

@fnicollier Can you reproduce this issue outside of Azure? Do you have a server I can test against?

If not, can you try moving this line to here

@fnicollier
Copy link

fnicollier commented May 26, 2020

Sadly I can't reproduce this outside of Azure. I'm trying the change you suggest and will report back after we've done testing.

Update 1: Ran some tests and as before it first seems to run fine but eventually returns an error. But this time I'm getting the following error "An existing connection was forcibly closed by the remote host" which points to a server issue which would be an improvement.

@drieseng
Copy link
Member

@fnicollier Thanks for the feedback

@fnicollier
Copy link

Update 2: No more problem. It seems the issue was server-side but the change you suggested allowed us to get a nice meaningful error message ("An existing connection was forcibly closed by the remote host") instead of the cryptic SSH one ("Server response does not contain SSH").

@drieseng
Copy link
Member

drieseng commented Jun 7, 2020

2020.0.0-beta1 is now available, and includes this fix.

@fnicollier
Copy link

Thanks for maintaining this library!

@drieseng
Copy link
Member

drieseng commented Jun 7, 2020

... and thanks for appreciating it :p

@EddyRts
Copy link

EddyRts commented Oct 8, 2020

Since we had this issue with version 2016.1.0.0, I retried with the 2020.0.0-beta1 release but the problem still persist.

Renci.SshNet.Common.SshConnectionException: Server response does not contain SSH protocol identification.

SSH.NET version: NuGet 2020.0.0-beta1
.NET version: .NET framework 4.7.2
Environment: Windows Server 2019

@asheroto
Copy link

I just updated Windows on my computer and am getting this now. None of my code has changed.

@mayo589
Copy link

mayo589 commented Dec 2, 2020

I have also this problem like @EddyRts. Hopefully updated my version to 2020.0.0-beta1 but still getting this error:

Server response does not contain SSH protocol identification

I am also on Win Server 2019 + .NET framework 4.7.2

@drieseng
Copy link
Member

drieseng commented Dec 2, 2020

Can one of you provide (private) access to a non-production server that allows me to reproduce this issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests