ssh_config: Hostname with multiple IP addresses
Harald Dunkel
harri at afaics.de
Thu Dec 17 16:27:05 AEDT 2020
On 12/15/20 1:09 AM, asymptosis wrote:
>
> But as you say, this would conventionally be handled just by having a separate Host per Hostname, eg
>
> Host foo.ipv4
> Hostname 192.168.0.1
>
> Host foo.ipv6
> Hostname fc00::1
>
It would be more intuitive to use
Host foo
Hostname 192.168.0.1,fc00::1
# many
# more
# options
in .ssh/config and (for example)
ssh -6 foo ...
if you want to select the AF at all. That would be consistent to
Host foo
Hostname foo.example.com
# many
# more
# options
for relying on a naming service. BTW, changing /etc/hosts, LDAP,
external DNS or whatever might not be an option due to to local
restrictions.
>
> That is, I think there should be a principle of "minimise client guessing games". So, even if multiple entries makes sense for Hostname, I would still be inclined to disagree with any proposal to add this feature.
I disagree. ssh handles DNS returning several A and AAAA records
quite well. Having multiple IP address entries in the Hostname line
would be the same "guessing game".
IPv6 should no longer be ignored or considered as "not important for
us". Dual stack is state of the art today.
Regards
Harri
More information about the openssh-unix-dev
mailing list