I want a host section in my ssh config that matches any local IP:
Host 10.* 192.168.*.* 172.31.* 172.30.* 172.2?.* 172.1?.*
setting
setting
...
This works as long as I connect directly to a relevant IP. If I however connect to a hostname that later resolves to one of these IPs, the section is ignored.
sshd has Match Address sections which I think can be used for this, but they won't work in ssh client configs.
Is there any way to achieve this?
Best Answer
You can't do that using only
ssh_config
options, but there isexec
option, which can do that for you: