I have a number of Linux machines, all with avahi running and a few Macs, all on the same local network.

I often use ssh between pairs of machines, using hostname.local as the address. Most times this is resolved seamlessly, but sometimes this fails and attempting to ping results in the following error ping: cannot resolve hostname.local: Unknown host

It is possible to communicate using the IP Address, if I can determine this.

My question is why does hostname.local fail, and what can I do about it? It appears to be a problem on the local machine, as rebooting fixes things, but I would rather avoid if possible.


Avahi just handles the server half. You need an mDNS configuration set up for the DNS resolver.

With glibc, it would be in /etc/nsswitch.conf. I'm not sure where it is in other libcs.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.