Re: ssh_config: Hostname with multiple IP addresses

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

 



On 12/12/20 3:50 AM, asymptosis wrote:
Having both IPv4 and IPv6 address defined for a specific Host would be

How would your client know which one to go to?

Say I had:

Host foo
Hostname 192.168.2.2 192.168.2.3

Do I end up at 192.168.2.2 randomly half the time, and 192.168.2.3 the rest of the time?


Actually this is about providing an IPv4 and IPv6 address in parallel,
but its not uncommon to have several IP addresses in the same AF bound
to the same host name in DNS.

In this case it might be reasonable to look at the subnets of the local
network interfaces. If the ssh config file on your laptop says (for example)

	Host foo
		Hostname 192.168.1.2 10.10.0.4

and your host has a local IP address 10.10.0.5/24, its pretty obvious
which IP address ssh should connect to.

Of course I understand that this code is not in. Its just an example
to show that having multiple IP addresses on the Hostname line (or a
hostname mapping to multiple IP addresses) is not unreasonable.


Regards
Harri
_______________________________________________
openssh-unix-dev mailing list
openssh-unix-dev@xxxxxxxxxxx
https://lists.mindrot.org/mailman/listinfo/openssh-unix-dev



[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux