Open shef opened 4 years ago
I found the error in source code: https://github.com/sshnet/SSH.NET/blob/develop/src/Renci.SshNet/Netconf/NetConfSession.cs#L62
Line 62, inappropriate usage of "_messageID" variable. This variable never had value assigned. Alternatively, you can set "automaticMessageIdHandling" to "false" and it works then
Hi With similar code I get timeout from teh device:
var ncClient = new NetConfClient(remoteHost, 22, user, password);
ncClient.Connect();
Console.WriteLine("Connected")
The error I get is following:
Unhandled exception. Renci.SshNet.Common.SshException: Channel was closed.
at Renci.SshNet.SubsystemSession.WaitOnHandle(WaitHandle waitHandle, Int32 millisecondsTimeout)
at Renci.SshNet.NetConf.NetConfSession.OnChannelOpen()
at Renci.SshNet.SubsystemSession.Connect()
at Renci.SshNet.NetConfClient.CreateAndConnectNetConfSession()
at Renci.SshNet.NetConfClient.OnConnected()
at Renci.SshNet.BaseClient.Connect()
at Program.<Main>$(String[] args) in /home/mssy/Program.cs:line 12
Credentials correct, but I cannot understand why I get timeout. Debug on the router doesn't provide any useful info
I'm learning SSH.NET and stuck at SendReceiveRpc. Every time I try to send any command - I'm getting NullReferenceException.
The code is very simple, probably I'm doing something stupid:
On last line I'm getting NullReferenceException. In the locals I see that ncClient.IsConnected = true. Any suggestions? RTFM? Using SSH.NET version 2016.1.0 package.