Avahi mDNS allows connecting to the Raspberry Pi and other Avahi-enabled host devices without knowing the host IP address.
For the Raspberry Pi, the default mDNS address is
raspberrypi comes from
/etc/avahi/avahi-daemon.conf puts mDNS on all active interfaces–including WiFi.
Manual config Avahi interfaces
This procedure is NOT typically needed. This example is for a Raspberry Pi 3 with Raspbian.
- On Raspberry Pi, find WLAN adapter name by
wlan0. Also note the
wlan0IP address for testing if Avahi doesn’t work right away.
or whatever interface desired to have Avahi on.
- Verify which interfaces and IPv6/IPv6 Avahi is active on from the Avahi host device:
service avahi-daemon status
- Test Raspberry Pi Avahi mDNS: from a Mac, Linux, Windows or Android device try
If that doesn’t work, try using the IP address as found on Avahi host:
Configure firewall for SSH
Be sure you’ve opened the Raspberry Pi
ufw firewall port.
You should see Port 22 (or other SSH port assigned in
/etc/ssh/sshd_config on the Raspberry Pi) from
If you prefer a Firewall GUI:
apt install gufw
apt install avahi-utils mdns-scan
- from your laptop (or Pi if diagnosing)
You should see your device (also try this from your Pi).
Use SSH Public Key Authentication with ED25519 keys. Raspberry Pi is trivial to hack like any other device on any operating system if proper cybersecurity is not used. Why do you care if someone hacks your Pi? The hacker can use the Pi’s relatively powerful CPU & GPU to stage sophisticated attacks on the rest of your network.