Pārlūkot izejas kodu

Fix SshAuthenticationException by handling PartialSuccess response and continue authentication proccess in that case

olegkap_cp 12 gadi atpakaļ
vecāks
revīzija
908c22cc93
1 mainītis faili ar 1 papildinājumiem un 1 dzēšanām
  1. 1 1
      Renci.SshClient/Renci.SshNet/ConnectionInfo.cs

+ 1 - 1
Renci.SshClient/Renci.SshNet/ConnectionInfo.cs

@@ -419,7 +419,7 @@ namespace Renci.SshNet
 
                 authenticated = method.Authenticate(session);
 
-                if (authenticated == AuthenticationResult.PartialSuccess)
+                if (authenticated == AuthenticationResult.PartialSuccess || (method.AllowedAuthentications != null && method.AllowedAuthentications.Count() < allowedAuthentications.Count()))
                 {
                     // If further authentication is required then continue to try another method
                     allowedAuthentications = method.AllowedAuthentications;