You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Certain Cisco devices do not adhere to RFC4342 and do not reply if the client identifies first.
Since identifcation can be in random order it will give random connection issues because the SSH_MSG_KEXINIT will not be sent if the client is faster.
Since SSH.Net is not at fault and compatibility with Cisco (and possibly other) devices is something that can easily be supported I've written this modification.
Added LazyIdentification to the ConnectionInfo object to allow late identification in ProtocolVersionExchange.
Overloaded 'Start' function to keep the original functionality and tests intact.
Highly likely fixes issues sshnet#752, sshnet#778, sshnet#469 and might help with sshnet#798, sshnet#767, sshnet#807
Copy file name to clipboardExpand all lines: src/Renci.SshNet/ConnectionInfo.cs
+10
Original file line number
Diff line number
Diff line change
@@ -183,6 +183,14 @@ public class ConnectionInfo : IConnectionInfoInternal
183
183
/// </value>
184
184
publicintMaxSessions{get;set;}
185
185
186
+
/// <summary>
187
+
/// Gets or sets if the client should identify itself later.
188
+
/// </summary>
189
+
/// <value>
190
+
/// <c>false</c>, the default for strict RFC4253 compliance where both sides identify at the same time. <c>true</c> if the client should wait for the server identification.
191
+
/// </value>
192
+
publicboolLazyIdentification{get;set;}
193
+
186
194
/// <summary>
187
195
/// Occurs when authentication banner is sent by the server.
188
196
/// </summary>
@@ -432,6 +440,8 @@ public ConnectionInfo(string host, int port, string username, ProxyTypes proxyTy
0 commit comments