3 ms·
You can add exclusions for the hosts in your local colliding subnet with something like: Host 10.1.0.* ProxyJump jumpbox-10.1.0.x !host hosta,hostb.e
by sillystuff 5y ago
You can add exclusions for the hosts in your local colliding subnet with something like:
Host 10.1.0.*
ProxyJump jumpbox-10.1.0.x !host hosta,hostb.example.org,hostc,10.1.0.23
- jffry 5y agoInteresting, would there be any reason to prefer that style over exempting them from the Host pattern? Host 10.1.0.* !hosta !hostb.example.org !hostc !10.1.0.23 ProxyJump jumpbox-10.1.0.x Doing it at the Host level would also make it easier if there were other config you wanted to apply for the group of machines (like IdentifyFile or Port)
- sillystuff 5y agoSorry, I made two mistakes when I wrote my response. The !host bit should be in the line above I've only used it in a Match block. I think your syntax is correct for a Host block exclusion. e.g., Match !exec "test1 -h %h -p %p >/dev/null 2>&1 || test2 >/dev/null 2>&1" host 10.1.0.*,*@example.org !host 10.1.0.4,10.1.0.11,hostb@example.org ProxyJump jumpbox-10.1.0.x The tests can be, e.g., see if the destination host can be reached directly, and if yes, bypass the jumphost. Using %h and %p ssh will pass the destination hostname and port to the test command.