Yosemite: ssh slow to connect when using DNS alias
I found a “fix” for this, though it still doesn't explain anything.

In our organization, we have “standard” DNS arranged hierarchically for different sites, just as you would expect. We also have an Active Directory structure that is largely flat. The resolv.conf (actually defined in Network Settings) had my local DNS domain listed as a search domain. I discovered quite by accident that adding the AD domain as a search domain fixes the problem!

So now I have something like:

search mysite.example.com ad.example.com


Now ssh’ing to an unqualified alias takes no more time than any other form of the host name.

Really bizarre, and I have no idea why this fixes it.