You all know that when you define your own domain as "example.net", and you want to ping a host called "mailbox.example.net", you can just use the (non-qualified) hostname "mailbox". Eg: ssh mailbox
If you have a host called web01.production.example.net, weather or not you can use "web01.production" as a shortname depends on how your operating system is configured.
In Mac OSX (Mountain) Lion, the shortcut won't work. If the hostname you try to use has a . in it, OSX will always assume it's a FQDN (fully qualified domain name), and won't try to append your default search domain.
There is a way to change this behaviour, and involves changing a .plist file, so be sure to have a backup before you make any changes...
Here we go:
1) Backup /System/Library/LaunchDaemons/com.apple.mDNSResponder.plist
sudo cp /System/Library/LaunchDaemons/com.apple.mDNSResponder.plist ~/com.apple.mDNSResponder.plist.backup
2) Edit mDNSResponder.plist to include the "-AlwaysAppendSearchDomains" setting. You can use any text editor you like, just don't forget to invoke it via sudo. If you know vi(m), that's probably the easiest way:
sudo vim /System/Library/LaunchDaemons/com.apple.mDNSResponder.plist
3) You need to add <string>-AlwaysAppendSearchDomains</string> to the ProgramArguments array. In my copy, it was around line 16. Eg:
<key>ProgramArguments</key> <array> <string>/usr/sbin/mDNSResponder</string> <string>-launchd</string> <string>-AlwaysAppendSearchDomains</string> </array>
4) Reload the mDNSResonder service:
sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.mDNSResponder.plist sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.mDNSResponder.plist