IPv6 Network subnets in PATTERNS ?
Brian Candler
b.candler at pobox.com
Thu Oct 9 18:17:20 AEDT 2025
On 09/10/2025 07:43, hvjunk wrote:
> Reading on PATTERNS in ssh_config(5), I noticed only IPv4 wildcard and range options, but nothing for IPv6?
>
> I especially are interested in PATTERNS that have network subnets, like 2001:0DB8:dead:beef::/64 and 192.168.128.0/23
It's not very sophisticated: it's just character matching as documented. Try:
Host 2001:db8:dead:beef::*
Host 192.168.128.*,192.168.129.*
Note that it's only matching on what the user types as the hostname(*) (e.g. "ssh foo at 2001:db8:dead:beef::a:b:c:d"), not the resolved IP address.
(*) Optionally also after hostname canonicalization
More information about the openssh-unix-dev
mailing list