3

Hello I have the following setup:

  1. Ubuntu 14.04 LTS Laptop

  2. A lot of Raspberry-Pi Model 2 with WLAN

The complete setup is based on 802.11 WLAN AD-HOC mode. None of the Pis nor the Laptop uses any static IPs (No IPv4 and IPv6) The only address available are the IPv6 Link-Local Addresses fe80::

Every Pi has the avahi-daemon on it and I am using mdns on each of them. Hence I could ping them using their .local names. viz.

ping6 -I wlan0 hydrogen.local
ping6 -I wlan0 radium.local

The only concern is why can't I use ssh and scp with the .local names of the Pis.

I can perform task with the Link-Local addresses viz.

ssh -6 pi@fe80::a1b2:c3ff:fed4:f5g6%wlan0
scp -6 someFile.txt pi@[fe80::a1b2:c3ff:fed4:f5g6%wlan0]:/home/pi/

but cannot use

ssh -6 pi@hydrogen.local%wlan0
scp -6 someFile.txt pi@[radium.local]%wlan0:/home/pi/

Although I have Pis from the same manufacture which makes typing the MAC addresses less difficult It would be easier for an end user to use the mdns names? Any solution for this?

my /etc/nsswitch.conf on the Ubuntu Laptop is follows:


hosts:      files mdns_minimal [NOTFOUND=return] dns mdns
networks:       files
protocols:      db files
services:       db files
ethers:         db files
rpc:            db files
netgroup:       nis
Shan-Desai
  • 280
  • 1
  • 3
  • 17
  • What error exactly do you get when you use `hydrogen.local`? – DerfK Jun 08 '16 at 18:53
  • in scp it says that the arguments are incorrect and ssh it gives pretty much the same. I am not currently at the workplace to give you the exact errors but will reproduce them tomorrow. – Shan-Desai Jun 08 '16 at 19:24
  • @DerfK `ssh: Could not resolve hostname hydrogen.local%wlan0: Name or service not known` same for `ssh -6 pi@[hydrogen.local]%wlan0` and `ssh -6 pi@[hydrogen.local%wlan0]` – Shan-Desai Jun 09 '16 at 10:02
  • 1
    According to [this post from 2010](https://blogs.gentoo.org/eva/2010/12/17/things-you-didnt-known-about-ipv6-link-local-address/) %interface only works with an ip6 *address*, not a hostname. It looks like the situation hasn't changed since then. See also [this Q/A](http://superuser.com/a/237000/55979) – DerfK Jun 13 '16 at 22:31
  • I think You are right. I followed the Q/A for a long time but no luck with mDNS ! oh well! Thanks anyways – Shan-Desai Jun 14 '16 at 10:53
  • Thinking about it, you might be able to do this if you use `ssh -o BindAddress=fe80::localinterfaceaddress hydrogen.local` to force ssh to bind to the correct ipv6 interface, but you'll have to look up the correct ipv6 address for your local interface. – DerfK Jun 14 '16 at 15:21
  • That could be a good alternative since anyways the LL-addresses are unique and the names are pre-defined to each device anyways. – Shan-Desai Jun 14 '16 at 15:30

0 Answers0