Network hostname lookup trouble

Written in the mid-afternoon in English • Tags:

Some programs sometimes fail to use the DNS search list to look up names of local hosts on my Mavericks laptop. I don’t recall ever having had this problem with earlier OS X versions.

% ssh speyburn
ssh: Could not resolve hostname speyburn: nodename nor servname provided,
or not known
Exit 255

I have the local domain in the Search Domains1 list of the Wi-Fi interface, just the one entry. Both host and nslookup, for example, can find the host just fine. However ssh from MacPorts or tools I’ve compiled myself fail just like /usr/bin/ssh.

At one point I thought the issue could be (strangely) only with commands linked with the libresolv library,2 but one of the tools I’ve compiled myself appears to prove this theory wrong.

As noted by jethro1138 on the Apple forum turning Wi-Fi off and back on fixes the problem, at least temporarily. Now I have to wait for the problem to come back to troubleshoot it further.


  1. System Preferences > Network > Wi-Fi > Advanced > Search Domains 

  2. otool -L /usr/bin/ssh