Ejemplo n.º 1
0
 void info_AuthenticationPrompt(object sender, Renci.SshNet.Common.AuthenticationPromptEventArgs e)
 {
     foreach (var prompt in e.Prompts)
     {
         prompt.Response = Password;
     }
 }
Ejemplo n.º 2
0
 void HandleIntractiveKeyBoardEvent(Object sender, Renci.SshNet.Common.AuthenticationPromptEventArgs e)
 {
     foreach (Renci.SshNet.Common.AuthenticationPrompt prompt in e.Prompts)
     {
         if (prompt.Request.IndexOf("Password:", StringComparison.InvariantCultureIgnoreCase) != -1)
         {
             prompt.Response = drvPassword;
         }
     }
 }