ssh with easy dns resolution

In my work env we have a lots of hosts. most all the hosts are in similar hostnames for eg cluster11.data.corp.sb1.uni.com, med123.data.corp.sk1.uni.com, also we have some server is colo network which have the host name like cluster11.data.colo.sb1.uni.com

Please help me to make the resolution easy I want to ssh the sever like this

ssh cluster11
ssh custer11.colo
ssh med123

---------- Post updated 02-08-12 at 12:08 AM ---------- Previous update was 02-07-12 at 10:23 PM ----------

I know i can make it by adding the .ssh/config file

Host cluster11
Hostname cluster11.data.corp.sb1.uni.com

but i have 20000 server not possible to add all the server in need a solution someone please help

Look at the search string in your /etc/resolv.conf file. If you add domains like:

search data.corp.sb1.uni.com data.corp.sk1.uni.com data.colo.sb1.uni.com

it should look in one subdomain after another to find the host.

Consult the man pages - I don't think you can have more than 7 domains on the search line...

With all of those subdomains and duplicate hostnames, it's not an easy problem to solve...

alternately, you can create CNAME entries in DNS. Yes, there are lots, but it is a one time thing. Also, you can change where the CNAME points in case you ever change the host name or IP address of the other servers, which gives increased flexibility.