IPv6 Network subnets in PATTERNS ?
Stuart Henderson
stu at spacehopper.org
Thu Oct 9 18:12:42 AEDT 2025
On 2025/10/09 08:43, hvjunk wrote:
> Good Morning,
>
> 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
PATTERNS specifically documents the string based pattern matches which
apply for various things including those that aren't addresses.
While there are no examples there showing v6 addresses, the same match
types for ? and * apply. (there are no examples in PATTERNS for bit
masks in v4 addresses either).
Bit mask matches are allowed where IP addresses are given and this
is usually documented when an option takes an address - search in
ssh_config or sshd_config for CIDR or masklen and you'll find some
examples including for IPv6.
More information about the openssh-unix-dev
mailing list