void info_AuthenticationPrompt(object sender, Renci.SshNet.Common.AuthenticationPromptEventArgs e) { foreach (var prompt in e.Prompts) { prompt.Response = Password; } }
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; } } }