Browse Source

Merge pull request #9 from antmeehan/fix-issue-8

Handle SSH_MSG_GLOBAL_REQUEST earlier in the connection process
Gert Driesen 9 năm trước cách đây
mục cha
commit
a5a6044226
1 tập tin đã thay đổi với 3 bổ sung1 xóa
  1. 3 1
      src/Renci.SshNet/Session.cs

+ 3 - 1
src/Renci.SshNet/Session.cs

@@ -590,6 +590,9 @@ namespace Renci.SshNet
 
                     //  Some server implementations might sent this message first, prior establishing encryption algorithm
                     RegisterMessage("SSH_MSG_USERAUTH_BANNER");
+					
+					// Modern versions of OpenSSH server use this generic message for various proprietary extensions of the SSH protocol.
+                    RegisterMessage("SSH_MSG_GLOBAL_REQUEST");					
 
                     // mark the message listener threads as started
                     _messageListenerCompleted.Reset();
@@ -624,7 +627,6 @@ namespace Renci.SshNet
                     Thread.Sleep(2000);
 
                     //  Register Connection messages
-                    RegisterMessage("SSH_MSG_GLOBAL_REQUEST");
                     RegisterMessage("SSH_MSG_REQUEST_SUCCESS");
                     RegisterMessage("SSH_MSG_REQUEST_FAILURE");
                     RegisterMessage("SSH_MSG_CHANNEL_OPEN_CONFIRMATION");