Code: Select all
https://www.devart.com/sbridge/docs/index.html?ssh_tunnel_principles.htm
.2.Upon the first connect to the server you receive its public key that has to be stored in the storage for the future use to authenticate the server
When I connected to a remote server at design time this is indeed what happened. TScFileStorage downloaded a public key from the server as soon as I connected. I could then see the filename of the downloaded public key and, again at design time, assign that filename to the HostKeyProperty of the SSHClient component. This worked OK to obtain the public key and assign its filename at design time.
However, the public key might change. So at run time, when my application is running on someone else's PC, I'd like it to re-download the public key, store it via the TScFileStorage component, find out what filename was given to it after it was downloaded and assign that filename to the HostKeyProperty of the SSHClient component.
How is this done?