Check out http://support.apple.com/kb/HT4845
Using search domains with more than two labels
You may configure a search domain with more than two labels such as "corp.example.com" in the Network pane of System Preferences. This search domain, and only this search domain, will be appended to simple hostnames in applications that connect to resources on the network. For example, if you type "www" into Safari's address field, it will try to connect to www.corp.example.com (only). In previous versions of Mac OS X, Safari would try to connect to www.corp.example.com, and if that did not work, it would try to connect to www.example.com.
To replicate the behavior of previous Mac OS X versions in OS X Lion, you can specify more than one search domain, such as "corp.example.com" and "example.com".
This fix worked for me :
Currently Being ModeratedNov 28, 2011 12:48 PM (in response to Frank Taillandier)
Yes, I am using that as well. The Apple solution does not work for me since we have:
so setting both bar.org and foo.bar.org in the DNS search would not work. I really need 'ssh home.foo' to work and your link provided that solution.
As it turns out, ssh can do this for you and it is more secure than using the old Apple way. If you are using ssh, simply modify (or create) your ~/.ssh/config to include:
With this added, ssh home is converted to ssh home.bar.org and ssh home.foo becomes ssh home.foo.bar.org.