Page 1 of 1

TScSSHClient: Keys storage by host/host:port

Posted: Sat 10 Mar 2018 00:24
by cboling
It appears that TScSSHClient's storage of host keys is always by hostname, not hostname:port as is common practice. This presents a problem when there are multiple SSH servers running on different ports at the same address.

Right now, the only work-arounds I can think of are:
  • Use an IP address for one port and a name for a 2nd one
  • Add aliases to DNS or your hosts file for additional ports
  • Manage your own key file swapping (e.g. copy "host-123.key" to "host.key" right before connecting)
Any better ideas?

Re: TScSSHClient: Keys storage by host/host:port

Posted: Mon 12 Mar 2018 12:57
by ViktorV
If you want us to implement the feature, please post it at our user voice forum: https://devart.uservoice.com/forums/174370-securebridge. If the suggestion gets a lot of votes, we will consider the possibility to implement it.

Re: TScSSHClient: Keys storage by host/host:port

Posted: Mon 23 Apr 2018 12:09
by ViktorV
You can solve your task by using the TScSSHClient.HostKeyName property. Since TScSSHClient does not store keys on its own, when saving the key, you should specify the name you need, for example host-22 or host 25. Next, before connecting, you need to set the TScSSHClient.HostKeyName property to the correct value, for example host-22 when using port 22 or host 25 when using port 25.

Re: TScSSHClient: Keys storage by host/host:port

Posted: Tue 24 Apr 2018 17:58
by cboling
Outstanding! So if you don't like the default host key name, you can, uh, duh, set the HostKeyName property! (--and if you leave it blank, it just uses HostName.) Thank you for pointing that out.

Re: TScSSHClient: Keys storage by host/host:port

Posted: Wed 25 Apr 2018 07:28
by ViktorV
Thank you for the interest in our products.
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.