SSH.NET icon indicating copy to clipboard operation
SSH.NET copied to clipboard

what is difference ssh.net vs ssh.net-netconf

Open peter2145 opened this issue 1 year ago • 8 comments

  1. My program is doing netconf communication. (me is netconf client) 1-1. When I use 'ssh.net-netconf', all of them(connect/sendreceieve ) success. 1-2. When I use 'ssh.net', only connect success. what difference?

  2. I need host key algorithm "ecdsa-sha2-nistp256". But netconf package has just rsa, dss. How can I add "ecdsa-sha2-nistp256" algorithm without ssh.net package?

peter2145 avatar Oct 06 '23 07:10 peter2145

The SSH.NET-NETCONF package is a fork of this one, with (only) the following changes:

https://github.com/sshnet/SSH.NET/compare/develop...declspec:SSH.NET:develop

That could explain why it works.

Rob-Hague avatar Oct 06 '23 08:10 Rob-Hague

@Rob-Hague I'm not familiar with netconf at all. I see what was change in this fork, but for now, I don't know what it does. I need more time to get to know this. Unless @Rob-Hague you know what this is about.

                var xpath = "/nc:hello/nc:capabilities/nc:capability[text()='urn:ietf:params:netconf:base:1.1']";

                _usingFramingProtocol = ServerCapabilities.SelectSingleNode(xpath, nsMgr) != null
                    && ClientCapabilities.SelectSingleNode(xpath, nsMgr) != null;

WojciechNagorski avatar Oct 06 '23 09:10 WojciechNagorski

I am also unfamiliar with netconf

@peter2145 you may try the above change with the latest code here (which has ecdsa) and see if it works

Rob-Hague avatar Oct 06 '23 10:10 Rob-Hague

I using nuget Pkg 'SSH.NET-netconf'. How Can I Use the latest PKG?

peter2145 avatar Oct 09 '23 23:10 peter2145

Also, Is there anything for adding file "ecdsa-sha2-nistp256" algorithm? I don't want to use nuget PKG 'SSH.NET'.

peter2145 avatar Oct 10 '23 00:10 peter2145

@peter2145 you should download the code, make the changes to NetConfSession.cs and build it. Then you can add a project reference and see if it works

image

Rob-Hague avatar Oct 10 '23 07:10 Rob-Hague

@Rob-Hague I confirmed that it is operating normally. The parameters of SendReceiveRPC() change depending on the _usingFramingProtocol variable. I think parameter is problem.

Please reflect the above code in the SSH.NET package.

peter2145 avatar Oct 10 '23 08:10 peter2145

Thanks for checking. There is actually a similar change in PR #946 which seems to also fix the issue.

Rob-Hague avatar Oct 10 '23 12:10 Rob-Hague