4
I have a raspberry pi (raspbian jessie) with ssh & vnc services registered in avahi. I can see both services in my client (chromebook)
chronos@localhost ~ $ avahi-browse -arl
+ mlan0 IPv4 raspberrypi SSH _ssh._tcp local
+ mlan0 IPv4 raspberrypi VNC _rfb._tcp local
+ mlan0 IPv4 raspberrypi [30:b5:c2:1e:2f:df] _workstation._tcp local
= mlan0 IPv4 raspberrypi SSH _ssh._tcp local
hostname = [raspberrypi.local]
address = [192.168.1.200]
port = [22]
txt = []
= mlan0 IPv4 raspberrypi [30:b5:c2:1e:2f:df] _workstation._tcp local
hostname = [raspberrypi.local]
address = [192.168.1.200]
port = [9]
txt = []
= mlan0 IPv4 raspberrypi VNC _rfb._tcp local
hostname = [raspberrypi.local]
address = [192.168.1.200]
port = [5900]
txt = []
And it seems that I can resolve both the name and the address:
chronos@localhost ~ $ avahi-resolve --address 192.168.1.200
192.168.1.200 raspberrypi.local
chronos@localhost ~ $ avahi-resolve --name raspberrypi.local
raspberrypi.local 192.168.1.200
But whenever I try to ping or to ssh the raspberry from my chromebook, it would not resolve:
chronos@localhost ~ $ ping raspberrypi.local
ping: unknown host raspberrypi.local
chronos@localhost ~ $ ssh pi@raspberrypi.local
ssh: Could not resolve hostname raspberrypi.local: Name or service not known
Am I missing something? I can actually ssh my Raspberry Pi from another client (Arch Linux) in my local network, so I guess the problem should be on the Chromebook side.
This is the service definition that I'm using in the Raspberry Pi (/etc/avahi/services/ssh.service):
<?xml version="1.0" standalone='no'?><!--*-nxml-*-->
<!DOCTYPE service-group SYSTEM "avahi-service.dtd">
<service-group>
<name replace-wildcards="yes">%h SSH</name>
<service>
<type>_ssh._tcp</type>
<port>22</port>
</service>
</service-group>
Thanks for the workarounds. Note that the domain name service can be configured to do these lookups, and that is normally how e.g. Ubuntu is configured when avahi is installed, as described in my answer. – nealmcb – 2018-04-05T16:39:10.063