Skip to content

Avahi daemon on RPI2

C.F edited this page Oct 10, 2015 · 10 revisions

Avahi-daemon

The Avahi mDNS/DNS-SD daemon implements Apple's Zeroconf architecture (also known as "Rendezvous" or "Bonjour"). The daemon registers local IP addresses and static services using mDNS/DNS-SD and provides two IPC APIs for local programs to make use of the mDNS record cache the avahi-daemon maintains.

Install Avahi-daemon on RPI

sudo apt-get install avahi-daemon

Add a ssh service config file

sudo nano /etc/avahi/services/ssh.service

Add ssh config in ssh.service file

<?xml version="1.0" standalone='no'?>
<!DOCTYPE service-group SYSTEM "avahi-service.dtd">
<service-group>
<name replace-wildcards="yes">%h</name>
<service>
<type>_ssh._tcp</type>
<port>22</port>
</service>
</service-group>

Add a http service config file

sudo nano /etc/avahi/services/http.service

Add http config in http.service file

<?xml version="1.0" standalone='no'?>
<!DOCTYPE service-group SYSTEM "avahi-service.dtd">
<service-group>
<name replace-wildcards="yes">%h</name>
<service>
<type>_http._tcp</type>
<port>80</port>
</service>
</service-group>

Start Avahi-daemon

sudo systemctl start avahi-daemon.service

ssh to RPI by hostname

ssh bithollow.local

bithollow_ssh.png

Access to RPI via browser on Window, you have to install Apple's Bonjour, there is no standalone edition of Bonjour, however you can install Bonjour Print Services instead. Please download it from here. bithollow_browser.png