PrivateKeyNeeded Event
Asks the application for the client's private key.
Syntax
public event OnPrivateKeyNeededHandler OnPrivateKeyNeeded; public delegate void OnPrivateKeyNeededHandler(object sender, SftpclientPrivateKeyNeededEventArgs e); public class SftpclientPrivateKeyNeededEventArgs : EventArgs { public bool Skip { get; set; } }
Public Event OnPrivateKeyNeeded As OnPrivateKeyNeededHandler Public Delegate Sub OnPrivateKeyNeededHandler(sender As Object, e As SftpclientPrivateKeyNeededEventArgs) Public Class SftpclientPrivateKeyNeededEventArgs Inherits EventArgs Public Property Skip As Boolean End Class
Remarks
The component fires this event if the public key provided in Key was accepted by the server, but no private key is available for it.
Use this event handler to attach the private key to your Key. The component will pick the key up and continue the authentication.