SSH to one address, different ports, different hosts
Ben Scott
dragonhawk at gmail.com
Sun Mar 11 15:38:18 EDT 2007
On 3/11/07, Bruce Dawson <jbd at codemeta.com> wrote:
>> So I now have two completely different boxes (LinkSys WRT54G, and my
>> Dell PC) appearing to the world on a single IP address.
>
> The known_hosts file can have a comma-separated list of hosts in the
> first field.
Hmmm. That just lets me have multiple IP addresses for the same
key, right? I've got the opposite problem: Multiple keys for the same
IP address.
Hmmm, I wonder what would happen if I just cat'ed the two
known_hosts files together... ah-hah! That appears to have worked!
I've now got a known_hosts file with two lines which contain the same
DNS name and IP address, but different public keys. ssh appears to be
happy with either host/port now (it presumably tries each matching
line until it finds a key that works, or falls off the end of the file
and fails).
> You can also turn off StrictHostKeyChecking (but I haven't tried this).
The man page suggests that just prevents new host keys from being
added to the known_hosts file; it doesn't actually turn *off* host key
checking. At least, that's my interpretation.
-- Ben
More information about the gnhlug-discuss
mailing list