I have a raspberry announcing it's hostname with avahi-daemon for several services. However, even if I receive this at PCs over my network I cannot ssh it.

$ avahi-browse -at | grep -i ssh
+ wlp3s0 IPv4 raspi                SSH Remote Terminal  local
+ wlp3s0 IPv4 arch                 SSH Remote Terminal  local

$ ssh pi@raspi.local
ssh: Could not resolve hostname raspi.local: Name or service not known

$ ssh pi@raspi
ssh: Could not resolve hostname raspi: Name or service not known

I've tryed changing the host line at /etc/nsswitch.conf and some params at /etc/avahi/avahi-daemon.conf

avahi-discover shows perfectly it's IPv4 and IPv6, but when I get my machine known hosts all I get is my own machine

$ getent hosts       localhost.localdomain localhost arch       localhost.localdomain localhost arch

I've also tryed setting the IP to static at /etc/network/interfaces or trying to announce the hostname from dhclient.conf setting send host-name = "raspberry.pi"; with the same luck.

Also there's no iptables service running or any other firewall.

  • Is it running Debian, Raspbian, Arch...? All of those six commands should echo Raspberry's hostname: uname -n, hostname -a, hostname -s, hostname -d, hostname -f, hostname, do they? – gronostaj May 26 '13 at 17:11

You might have to add avahi to hostname resolution. Instructions for ArchLinux (which I suppose given that your machine's name seems to be arch) are available here : https://wiki.archlinux.org/index.php/Avahi#Hostname_resolution.

  • I've tryed it. I configured it and rebooted. It doesn't have a service or somewhere where I can reload nnswitch.conf? – dinigo May 26 '13 at 18:12

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.