Re: Including port number in known_hosts?



>>>>> "NC" == Nate Carlson <usenet@xxxxxxxxxxxxxxx> writes:

NC> We've got a case where we use a box with a single IP to proxy into
NC> multiple SSH servers; the way that known_hosts works right now, it
NC> only matches on the IP address or hostname.. is it possible to get
NC> known_hosts to include the port number, so you can have multiple
NC> SSH servers (with different keys) available via the same IP?

[~/.ssh/config]

host foo
hostname gateway
port 221

host bar
hostname gateway
port 222

..
..
..

[~/.ssh/known_hosts]

gateway (key of server to which gateway:221 is forwarded)
gateway (key of server to which gateway:222 is forwarded)
....

--
Richard Silverman
res@xxxxxxxx

.



Relevant Pages

  • Re: Known hosts file and host with multiple SSH ports
    ... > I have an IP address with multiple SSH servers running on several ... which was created while accessing the other port. ... > Are there any suggestions, other than editing the known hosts file, ...
    (comp.security.ssh)
  • Known hosts file and host with multiple SSH ports
    ... I have an IP address with multiple SSH servers running on several ... which was created while accessing the other port. ... Are there any suggestions, other than editing the known hosts file, ...
    (comp.security.ssh)
  • Re: Two NICs. two SSH servers
    ... two SSH servers, each bound to a different NIC and on a different port? ... The ListenAddress parameter in your config file defines which address ...
    (comp.security.ssh)
  • Re: Sockets, port and loop-back ?
    ... But URLs allow you to specify the port as well as the IP address ... the web server, You can configure this server (that listens on only ... and a router at 123.123.123.123 that masquerades Your subnet ... and You want to have ssh servers on both that are ...
    (comp.os.linux.networking)
  • Re: shutting down dictionary attacks
    ... It would also be useful to run the daemon on a different port than 22. ... This will probably throw 90% of the people scanning for ssh servers ...
    (SSH)