2

I would like to use avahi/zeroconf to do ssh logins to devices which are connected to the local network by wifi. Since I do not have control over the wifi routers I cannot assign fixed IP-addresses to the devices. Therefor I set up a multicast dns server (on my android phone) which registers the device. Now I see the device using an avahi-browser on my ubuntu notebook. However the hostname is assigned based on the IP-address, which I cannot know in advance. avahi-discover displays:

Service Type: _udisks-ssh._tcp
Service Name: samsungtablet
Domain Name: local
Interface: wlan0 IPv4
Address: 10-0-0-101.local/10.0.0.101:22
TXT Data: empty

I would like to be able to do ssh [email protected] or something like this in order to log in. It works now with ssh [email protected] but I cannot know this hostname in advance.

In contrast my Ubuntu notebook appears as

Service Type: _udisks-ssh._tcp
Service Name: einstein
Domain Name: local
Interface: wlan0 IPv4
Address: einstein.local/10.0.0.106:22
TXT Data: empty

Here ssh [email protected] will work.

Note that the hostname on the samsungtablet is set to samsungtablet using net.hostname. The multicast dns server I set up on the tablet contained in "servers ultimate" and the name there is set to samsungtablet as well.

Note that I am aware that SSHelper supports multicast dns as well, however I would prefere a solution where I can choose to keep my ssh-server.

0

You must log in to answer this question.

Browse other questions tagged .