I have a bunch of servers with the names srv1.domain.com, srv2.domain.com, ..., srv50.domain.com
I want to be able to connect to these servers by ssh srv1
I don't want to put 50 configuration entries to my .ssh/config such as
HOST srv1
HOSTNAME srv1.domain.com
USER amac
IdentityFile /home/amac/.ssh/id_rsa
What I like is a regular expression matching, which would allow me to write something like
HOSTNAME (srv[0-9]*).domain.com
HOST \1
USER amac
IdentityFile /home/amac/.ssh/id_rsa
Is this possible? Maybe by creating a bash alias which would convert all instances of "srv(.*)" to srv\1.domain.com, where \1 corresponds to the substring in the paranthesis matched by the regular expression?
Thanks.
domain.comto your search path in your DNS resolver so that any request to resolve a namefoowill result in the resolver tryingfoo.domain.com? – Zoredache Feb 23 '12 at 18:09