I can alias individual hosts in .ssh/config like this:
Host nickname
Hostname host1.example.com
But sometimes I want to alias a whole domain, so as to save typing on the command line for machines on that domain:
Host *.nick
Hostname %h.really.long.domain.example.com
That doesn't work as written, of course. Is there something that would?
Comments have suggested this question as a duplicate, but that solution doesn't work for this use case; it requires all hosts to be explicitly listed in the config file. I'm looking for a global method; I want to tell SSH 'rewrite any host of the form host???.short
as host???.really.long.example.com
.'
Think of it like an equivalent of sed s/.short/.really.long.etc/