Back to product page

FingerPrintEvent event


Fired when wodSFTP.NET receives public key from the server.

Syntax

  • C#
  • VB.NET
delegate void FingerPrintDelegate(object Sender, FingerPrintArgs Args);
The FingerPrintEvent(Args.Accept,Args.FingerPrint) syntax has these parts:
Args.AcceptBoolean. Return value you shout set to True if you want to accept connection to the server. If you think that FingerPrint is invalid, set this to False.
Args.FingerPrintByte array that represents server's fingerprint information.

Delegate Sub FingerPrintDelegate(ByVal Sender As Object, ByVal Args As WeOnlyDo.Client.SFTP.FingerPrintArgs)
The FingerPrintEvent(Args.Accept,Args.FingerPrint) syntax has these parts:
Args.AcceptBoolean. Return value you shout set to True if you want to accept connection to the server. If you think that FingerPrint is invalid, set this to False.
Args.FingerPrintByte array that represents server's fingerprint information.

Remarks

Since SSH architecture doesn't know about certificates, or other means of checking if remote server is really the one you intended to connect to, it is a matter of 'trust' if you will accept connection or not.

This is how SSH works in real life - once you connect to remote server and you are sure it is really the server you expect it to be, you should store Fingerprint information locally. For each new connection, you should test if Fingerprint information is same as stored one - to be sure that no one is 'in the middle'. Fingerprint information is almost unique among different server, and it is generated from server's private key.

If you set Accept to true (default), wodSFTP.NET will continue to perform negotiation with the server normally. If you set it to False (for instance, because you see that Fingerprint information is not the same as before), it will drop the connection.

Platforms

Windows