I have a desktop and a laptop PC. I can ssh from my laptop into my desktop by typing ssh desktop.local, but it doesn't work the other way round (I have to look up the ip address via ip a on desktop then type ssh 192.168.0.15 on laptop).
Sadly neither this nor this is helpful as both machines
- have
avahi-daemoninstalled - have the same line about
mdnsin/etc/nsswitch.conf - have the same
send host-name = gethostname();in/etc/dhcp/dhclient.conf - fail to find each other via
host desktoporhost desktop.local(!?) mdns-scanfinds both machines on both machines
I don't want to use the dirty hack of adding a line in /etc/hosts, especially because my laptop is sometimes on Ethernet and sometimes on WLAN, both having different IP addresses.