mDNS Not Working For hostname.local Resolution

Hello Everyone,

I am trying to get .local name resolution working for SSH. I have the Avahi package installed for mDNS and am on a fresh install of Manjaro Gnome on a 6th Gen X1 Carbon. I can SSH normally using the IP address, but any time I try to ssh using .local (macbook.local for example) it fails.

Any help would be greatly appreciated, thanks!

Usually your router create the subdomain in your local network.

Check this (adjust the ip):

nmap -sP 192.168.178.0/24

Otherwise you have to specifiy it in your /etc/hosts file.

This is easily resolved using an ssh configfile.
~/.ssh/config

Host gast
    ForwardAgent yes
    Hostname	192.168.178.41
#    Port 2894
    User andreas

the use:

ssh gast

or

ssh root@gast

Installed is not enough, you would need to start the service. And if you use systemd-resolved you might need to configure systemd-resolved to use local MulticastDNS.

@xabbu - How do I enable the service and have it start at startup automatically?

You can use

systemctl enable --now avahi-daemon.service

to start and enable (auto start) it in one step.

Alternative would be

systemctl start avahi-daemon.service

systemctl enable avahi-daemon.service
1 Like

This fixed it for me, thanks @xabbu !

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.