Occurs when server prompts for more authentication information.
Namespace: Renci.SshNetAssembly: Renci.SshNet (in Renci.SshNet.dll) Version: 0.1.0.0 (1.0.0.0)
Syntax
public event EventHandler<AuthenticationPromptEventArgs> AuthenticationPrompt
Examples
var connectionInfo = new KeyboardInteractiveConnectionInfo(host, username); connectionInfo.AuthenticationPrompt += delegate(object sender, AuthenticationPromptEventArgs e) { System.Console.WriteLine(e.Instruction); foreach (var prompt in e.Prompts) { Console.WriteLine(prompt.Request); prompt.Response = Console.ReadLine(); } }; using (var client = new SftpClient(connectionInfo)) { client.Connect(); // Do something here client.Disconnect(); }
See Also