I want to ssh into my Pi and I can do it right now with the ip address of the Pi. But I want to do it using mDNS. I want to connect using
ssh raspberrypi.local. I read that this should work. on the pi, the avahi-deamon is running:
pi@raspberrypi:~ $ service avahi-daemon status ● avahi-daemon.service - Avahi mDNS/DNS-SD Stack Loaded: loaded (/lib/systemd/system/avahi-daemon.service; enabled; vendor preset: enabled) Active: active (running) since Mon 2020-09-28 12:01:52 CEST; 35min ago Main PID: 326 (avahi-daemon) Status: "avahi-daemon 0.7 starting up." Tasks: 2 (limit: 1915) CGroup: /system.slice/avahi-daemon.service ├─326 avahi-daemon: running [raspberrypi.local] └─379 avahi-daemon: chroot helper Sep 28 12:31:21 raspberrypi avahi-daemon: Interface eth0.IPv6 no longer relevant for mDNS. Sep 28 12:31:21 raspberrypi avahi-daemon: Withdrawing address record for 10.42.0.56 on eth0. Sep 28 12:31:21 raspberrypi avahi-daemon: Leaving mDNS multicast group on interface eth0.IPv4 with address 10.42.0.56. Sep 28 12:31:21 raspberrypi avahi-daemon: Interface eth0.IPv4 no longer relevant for mDNS. Sep 28 12:31:34 raspberrypi avahi-daemon: Joining mDNS multicast group on interface eth0.IPv6 with address fe80::a3a0:c51a:4fa:5bd0. Sep 28 12:31:34 raspberrypi avahi-daemon: New relevant interface eth0.IPv6 for mDNS. Sep 28 12:31:34 raspberrypi avahi-daemon: Registering new address record for fe80::a3a0:c51a:4fa:5bd0 on eth0.*. Sep 28 12:31:45 raspberrypi avahi-daemon: Joining mDNS multicast group on interface eth0.IPv4 with address 10.42.0.56. Sep 28 12:31:45 raspberrypi avahi-daemon: New relevant interface eth0.IPv4 for mDNS. Sep 28 12:31:45 raspberrypi avahi-daemon: Registering new address record for 10.42.0.56 on eth0.IPv4.
The hostname is also raspberrypi so that is not the issue. I think the issue might be in my linux system I use to connect to the pi?
If I try to connect this is the error:
➜ ~ ssh raspberrypi.local ssh: Could not resolve hostname raspberrypi.local: Name or service not known
avahi-browse -arp and
avahi-resolve-host-name both also do not work.
My linux system is Fedora 32. I have checked that Avahi is running (same command as on the pi).
I connected the raspberry pi with an ethernet cable to my computer (which is using WiFi). I am sharing my WiFi to my Pi by setting the wired connection to "Shared to other computers" (with both IPv4 and IPv6).
Here is the avahi config on the pi:
pi@raspberrypi:~ $ cat /etc/avahi/avahi-daemon.conf # This file is part of avahi. # # avahi is free software; you can redistribute it and/or modify it # under the terms of the GNU Lesser General Public License as # published by the Free Software Foundation; either version 2 of the # License, or (at your option) any later version. # # avahi is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public # License for more details. # # You should have received a copy of the GNU Lesser General Public # License along with avahi; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 # USA. # See avahi-daemon.conf(5) for more information on this configuration # file! [server] #host-name=foo #domain-name=local #browse-domains=0pointer.de, zeroconf.org use-ipv4=yes use-ipv6=yes #allow-interfaces=eth0 #deny-interfaces=eth1 #check-response-ttl=no #use-iff-running=no #enable-dbus=yes #disallow-other-stacks=no #allow-point-to-point=no #cache-entries-max=4096 #clients-max=4096 #objects-per-client-max=1024 #entries-per-entry-group-max=32 ratelimit-interval-usec=1000000 ratelimit-burst=1000 [wide-area] enable-wide-area=yes [publish] #disable-publishing=no #disable-user-service-publishing=no #add-service-cookie=no #publish-addresses=yes publish-hinfo=no publish-workstation=no #publish-domain=yes #publish-dns-servers=192.168.50.1, 192.168.50.2 #publish-resolv-conf-dns-servers=yes #publish-aaaa-on-ipv4=yes #publish-a-on-ipv6=no [reflector] #enable-reflector=no #reflect-ipv=no [rlimits] #rlimit-as= #rlimit-core=0 #rlimit-data=8388608 #rlimit-fsize=0 #rlimit-nofile=768 #rlimit-stack=8388608 #rlimit-nproc=3
I am not sure why my system is not able to find the Pi... If you need any more information, I'll be glad to provide!