'Declaration Public Event HostKeyReceived As HostKeyReceivedEventHandler
'Usage Dim instance As SSHClient Dim handler As HostKeyReceivedEventHandler AddHandler instance.HostKeyReceived, handler
public event HostKeyReceivedEventHandler HostKeyReceived
Event Data
The event handler receives an argument of type HostKeyReceivedEventArgs containing data related to this event. The following HostKeyReceivedEventArgs properties provide information specific to this event.
Property | Description |
---|---|
AcceptHostKey | Gets or sets a System.Boolean value that indicates whether the server's public key should be accepted or rejected by the client. Default is true. |
HostKey | Gets a System.Byte array that represents the server's raw public key. |
HostKeyLength | Gets a System.Int32 that represents the length, in bits, of the public key that the raw host key data represents. |
HostKeyMD5Fingerprint | Gets a System.Byte array that represents the server's public key, computed into a MD5 hash value. |
HostKeyMD5FingerprintString | Gets a System.String that represents the server's public key, computed into a MD5 hash value. |
HostKeySHA256Fingerprint | |
HostKeySHA256FingerprintString | |
HostKeyType | Gets a System.String that represents the algorithm used to compute the server's public key. |
PublicKeyAlgorithm | Gets a ISSHPublicKeyAlgorithm object that represents the algorithm used to compute the server's public key. |
Remarks
The event arguments contain the server's public key. The key is available as an MD5 fingerprint or as the raw byte array. An application that subscribes to the event can accept or reject the key with the AcceptHostKey property.
Example
Requirements
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
See Also