TScSSHClient: Keys storage by host/host:port

Discussion of open issues, suggestions and bugs regarding network security and data protection solution - SecureBridge
Post Reply
cboling
Posts: 24
Joined: Fri 12 Apr 2013 01:00

TScSSHClient: Keys storage by host/host:port

Post by cboling » Sat 10 Mar 2018 00:24

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?

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

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

Post by ViktorV » Mon 12 Mar 2018 12:57

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.

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

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

Post by ViktorV » Mon 23 Apr 2018 12:09

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.

cboling
Posts: 24
Joined: Fri 12 Apr 2013 01:00

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

Post by cboling » Tue 24 Apr 2018 17:58

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.

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

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

Post by ViktorV » Wed 25 Apr 2018 07:28

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.

Post Reply