Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I've seen some questions asking why xxx can't connect to MyMacName.local, which answer regarding Avahi as a requirement.

I don't think I am in the same category as I can successfully connect to a Windows machine without needing to do anything on my Debian one.

I am able to SSH into both Windows and Mac via IP address, but the Mac only via IP.

Does something need to change on the Mac side or the Debian host?

UPDATE:

  • Debian can connect to Windows via hostname
  • Windows can connect to Debian via hostname
  • Debian cannot connect to OS X via hostname
  • OS X cannot connect to Debian via hostname

All can connect to each other via IP

share|improve this question
    
Can you try and rephrase your Q? I don't understand which can connect and which cannot using the hostname? Specifically from what to what. –  slm Nov 1 '13 at 23:16
    
possible duplicate of How to make a machine accessible from the LAN using its hostname –  slm Nov 1 '13 at 23:37
    
I'm not sure this is a duplicate. @lala, are you trying to get zeroconf/mDNS/avahi working (connect via hostname.local), or are you trying to connect via straight hostname without any domain component (just hostname)? That other answer doesn't cover mDNS at all. –  Patrick Nov 2 '13 at 0:28
add comment

3 Answers 3

up vote 1 down vote accepted

When I had this problem it has been DNS based. Basically, when a DCHP client gets a IP from a "retail" router (or many other DNS/DHCP combined servers), they add an entry to the the DNS server so that ping mybox will work.

Apple like to be just a little bit different about things, so I would not be surprised to find that your DNS server has no idea who "MyMacName.local" is.

Avahi, shouldn't have anything to do with "resolution" of the name when it comes to SSH, (though Avahi could make entries in your local DNS server).

First check if your DNS server has any idea who "MyMacName.local" is. If it doesn't then I would configure your router, or your mac to play better with each other.

Second, check if you mac is "advertising" ssh on Bojour. This link may help with that.

share|improve this answer
add comment

It turns out to have been a requirement for the avahi-daemon to be installed in Debian.

After simple sudo apt-get install avahi-daemon, both Mac and Debian can communicate with each other via hostnames.

The answer by coteyr led me in the right direction to try avahi after all.

And I thought Mac's were supposed to "just work" :P

share|improve this answer
add comment

Proper hostname connection depends on DNS. If your debian box is up 24/7 you could setup dnsmasq and turn it into your default DNS. Actually along with unbound make quite a great & secure combination, supporting DNSSEC and allowing you to configure your local network in a much more slick way :-)

share|improve this answer
    
yes, I see the benefit of cloud DNS services. It may be slower when working within a local environment, but real zero-conf would make up for that (and I guess local DNS-caching kicks in somewhere). Most workstations are laptops, so would need polling scripts to keep them up to date. –  lalalalalalalambda Nov 3 '13 at 3:19
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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