Host key not verified error

Discussion of open issues, suggestions and bugs regarding network security and data protection solution - SecureBridge
Post Reply
tkasloff
Posts: 7
Joined: Thu 09 Jul 2020 14:26

Host key not verified error

Post by tkasloff » Thu 09 Jul 2020 15:06

Using demo version of Securebridge for RAD Studio 10.3.

For last 3 days was able to run the SFTPClient demo and download files for a site I have access to.

However, today am getting "Host key not verified" error when doing the SSHConnect for same site.

Any idea why this is happening now & how issue can be resolved.

Thanks

ViktorV
Devart Team
Posts: 3168
Joined: Wed 30 Jul 2014 07:16

Re: Host key not verified error

Post by ViktorV » Fri 10 Jul 2020 10:32

The "Host key not verified" error occurs if the key received from the server and the key specified in HostKeyName do not match. You should handle the TScSSHClient.OnServerKeyValidate event. You can find the more detailed information about this event in SecureBridge help. Also you can look at the sample of this event handling in the SFTPClient demo project. The SFTPClient demo project is located at %SecureBridgeDemos%\SFTPClient. %SecureBridgeDemos% is the path where SecureBridge demo projects are installed on your computer.
The server key is used by the client to authenticate the SSH server. The key name is specified in the property TScSSHClient.HostKeyName. When the client is connecting to the SSH server, SecureBridge looks for the key under the path specified in the property TScFileStorage.Path - if it's found, the client uses the key. If the key was not found, you can use the TScSSHClient.OnServerKeyValidate event handler to obtain the server key and import it to TScFileStorage. If the TScSSHClient.OnServerKeyValidate event handler is not triggered, this means that the server key was found and authenticated.
Please check whether the file wit the KEY extension and a name corresponding to a specified property TScSSHClient.HostKeyName is present by the path specified in the keyStore.Path property, and delete it.

tkasloff
Posts: 7
Joined: Thu 09 Jul 2020 14:26

Re: Host key not verified error

Post by tkasloff » Mon 03 Aug 2020 02:01

The issue has been resolved. I had not properly set up & configured TScFileStorage.

I apologize for not responding to you earlier, but I only saw your reply when I posted my most recent problem earlier today.

From now on I''ll try to remember to check "Notify me when a reply is posted"

ViktorV
Devart Team
Posts: 3168
Joined: Wed 30 Jul 2014 07:16

Re: Host key not verified error

Post by ViktorV » Tue 04 Aug 2020 13:04

Thank you for the interest to our product.
It is good to see that the problem has been solved.
If you have any questions during using our products, please don't hesitate to contact us - and we will try to help you solve them.

Post Reply