UnknownKeyReceived Event
This event is fired when an unknown SSH key is received from the server.
Syntax
public event OnUnknownKeyReceivedHandler OnUnknownKeyReceived; public delegate void OnUnknownKeyReceivedHandler(object sender, SshclientUnknownKeyReceivedEventArgs e); public class SshclientUnknownKeyReceivedEventArgs : EventArgs { public int Algorithm { get; } public int Bits { get; } public string FingerprintSHA256 { get; } public int Action { get; set; } }
Public Event OnUnknownKeyReceived As OnUnknownKeyReceivedHandler Public Delegate Sub OnUnknownKeyReceivedHandler(sender As Object, e As SshclientUnknownKeyReceivedEventArgs) Public Class SshclientUnknownKeyReceivedEventArgs Inherits EventArgs Public ReadOnly Property Algorithm As Integer Public ReadOnly Property Bits As Integer Public ReadOnly Property FingerprintSHA256 As String Public Property Action As Integer End Class
Remarks
This event allows to check the fingerprint of the key received from the server, in case the key is not in the list of known keys. Algorithm and Bits specify the key algorithm and the number of bits. FingerprintSHA256 contains the key's fingerprint.
Use Action to tell the component what it should do with the key.