SSH to one address, different ports, different hosts
Dave Johnson
dave-gnhlug at davej.org
Sun Mar 11 17:23:55 EDT 2007
Ben Scott writes:
> Anyone else have thoughts or ideas to offer?
ssh client doesn't mind if there is more than one entry for a given
host in the known_hosts file.
Because of this you can simply manually edit the known_hosts file to
have multiple entries (one for each actual host) all with the same
hostname. ssh client won't do this automatically, but once you know
the public keys for each host you can then edit the file and add all
of them.
Once you add them all it will accept any of them for that hostname.
Example:
some.host.com ssh-rsa KEY-TEXT-FOR-HOST-1.....
some.host.com ssh-rsa KEY-TEXT-FOR-HOST-2.....
You can then ssh to some.host.com on some port and ssh client will
accept EITHER key listed in the file.
--
Dave
More information about the gnhlug-discuss
mailing list