The event handler receives an argument of type SshHostKeyConfirmationEventArgs containing data related to this event. The following SshHostKeyConfirmationEventArgs properties provide information specific to this event.
Property | Description |
---|---|
Confirmation | Gets or sets the value, indicating whether to continue connecting after this event. |
Host | Gets the name of the host, we are connecting with. |
KeyType | Gets the server public key type. |
Md5Fingerprint | Gets the string representation of the server public key fingerprint, generated with MD5 hash algorithm |
Port | Gets the port, we are connecting with. |
Sha1Fingerprint | Gets the string representation of the server public key fingerprint, generated with SHA1 hash algorithm |
Warning | Gets the warning message string. |
You may use this event to handle the situation when you don't have the host key, and have only its fingerprint. Devart.Common.SshHostKeyConfirmationEventArgs.Md5Fingerprint and Devart.Common.SshHostKeyConfirmationEventArgs.Sha1Fingerprint properties contain the string representation of the fingerprint, generated by the corresponding algorythm, as the hexadecimal digits. If you agree to continue connecting, you should set the Devart.Common.SshHostKeyConfirmationEventArgs.Confirmation property to Devart.Common.SshHostKeyConfirmation.Confirm.
Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2