On Fri, Mar 22, 2013 at 7:30 AM, Ryan Kavanagh <[email protected]> wrote: > Is there a way to have Host stanzas in an ssh_config containing a > HostName entry match Host stanzas corresponding to said HostName? In > other words, given an ssh config > > Host blah > HostName blah.example.org > > Host *.example.org > User bob > > can I have "ssh blah" also use the settings in the "*.example.org"?
No, not currently. The matching of Host is done on the name you provide to the ssh command, not whatever the name/address ultimately resolves to, and they're simple string matches. There is an open enhancement request to let it match subnets, which may or may not be sufficient for what you want (https://bugzilla.mindrot.org/show_bug.cgi?id=1169). -- Darren Tucker (dtucker at zip.com.au) GPG key 8FF4FA69 / D9A3 86E9 7EEE AF4B B2D4 37C9 C982 80C7 8FF4 FA69 Good judgement comes with experience. Unfortunately, the experience usually comes from bad judgement.

