I'd like to be able to do something like
Host *
HostName *.mydomain.com
...
So I can type something like
ssh test
ssh ci
ssh dev
Instead of having to type
ssh test.mydomain.com
ssh ci.mydomain.com
ssh dev.mydomain.com
Right now I have separate entries for each one, but we have dozens of machines, so I'd rather have a default rather than have to duplicate everything so many times.
Answer
Instead of doing this with ssh, use the /etc/resolv.conf file
Add a line saying
search mydomain.com
What this does is wherever you don't enter a full domain name, it will use this suffix to work out the full name, effectively appending .mydomain.com
to ci
when you do ssh ci
.
No comments:
Post a Comment