What you are trying to do is to add multicast DNS to the name searching on Raspbian.
Install the package libnss-mdns (ie: sudo apt-get install libnss-mdns
). This will pull in the Avahi packages to implement multicast DNS (which is used for name resolution for ".local" domains).
After installation ensure that /etc/nsswitch.conf has the line:
hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4
Edit: when going from mac-->raspi to ensure that the Mac can log into your Raspberry Pi install the package avahi-daemon and add a file /etc/avahi/services/ssh.service containing
<?xml version="1.0" standalone='no'?><!--*-nxml-*-->
<!DOCTYPE service-group SYSTEM "avahi-service.dtd">
<service-group>
<name replace-wildcards="yes">%h</name>
<service>
<type>_ssh._tcp</type>
<port>22</port>
</service>
</service-group>
Note that the RaspberryPi ships with IPv6 turned off. If the other host does not implement IPv4 link local addresses then you may need to turn on IPv6 on the RaspberryPi to have a IP protocol in common between the two machines. You can turn onIPv6 on the RasPi deleting /etc/modprobe.d/ipv6.conf and rebooting.