Server identification problem in NETStandart 2.0
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?
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?
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.
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?
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.
Sorry, maybe I made a mistake and an issue caused by .NET Standart 1.3. Could you reproduce this issue?
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.
@Kutikov Won't have time today. I'll try to test it tomorrow.
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?
Sorry too busy at work. Hope to have time this weekend.
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
"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?
Are you sure the 2008R2 is SSH/SFTP? The built in FTP server is FTP/FTPS(over SSL) and that is a nother protocol not SSH based
Sent from my iPhone
On Mar 26, 2018, at 2:03 PM, Stuart Williams (Magenic) [email protected] wrote:
"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?
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.
@lyzl Was looking for a fix for a while and downgrading worked great to get it working on Build 16299, thanks!
@Kutikov @theescapers @lyzl Can any of you still consistently reproduce this issue?
@drieseng, at this moment I can't check up functionality due to not using UWP and .NET Standart 1.3
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
I reproduce on 10% of our integration builds. Not consistently NetCore 2.1 on win10 & server2016 Last ssh.net nuget version + Syncplify server
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.
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.
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