2

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-daemon installed
  • have the same line about mdns in /etc/nsswitch.conf
  • have the same send host-name = gethostname(); in /etc/dhcp/dhclient.conf
  • fail to find each other via host desktop or host desktop.local (!?)
  • mdns-scan finds 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.

1

Avahi never works for me. Thus I am skeptical.

I think your router is allowing the desktop.local thing to work. Can you check? Did you set the desktop to receive port 22 on the router? People often do that unintentionally, since from outside, ssh requests go unanswered unless you direct them at a machine.

  • What am I supposed to check? I haven't configured any port forwarding on the router if you mean that. – xjcl Aug 16 '16 at 9:41

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.