I'm trying to ssh to a Pi Zero via USB link. While this works as expected from my MacBook with OSX 10.10, I'm not able to ssh or ping the raspberry From a Linux Host over USB.

What I did:

On the MicroSD-card: Add "dtoverlay=dwc2" to config.txt

Add "modules-load=dwc2,g_ether" to cmdline.txt

insert a blank file called "ssh" in the same directory as config.txt and cmdline.txt

On the Macbook ssh [email protected]

This works. Then I shut down the zero, add again a file called "ssh" in the directory and connect it to my Ubuntu Machine.

On the Ubuntu 17.04 Desktop machine

ssh [email protected]

Error: Could not resolve hostname

ssh pi@raspberrypi

Error: Could not resolve hostname


Bus 001 Device 019: ID 0525:a4a2 Netchip Technology, Inc. Linux-USB Ethernet/RNDIS Gadget

/etc/init.d/avahi-daemon status

Okt 09 10:00:03 ub1704-gerry avahi-daemon[6603]: Joining mDNS multicast group on interface enp0s20f0u12.IPv6…:fe13.

Okt 09 10:00:03 ub1704-gerry avahi-daemon[6603]: New relevant interface enp0s20f0u12.IPv6 for mDNS.

Okt 09 10:00:03 ub1704-gerry avahi-daemon[6603]: Registering new address record for fe80::3c1:11d6:f2aa:fe13…u12.*.


enp0s20f0u12: flags=4163 mtu 1500

  inet6 fe80::3c1:11d6:f2aa:fe13  prefixlen 64  scopeid 0x20<link>
    ether 52:bc:0f:ce:06:90  txqueuelen 1000  (Ethernet)
    RX packets 976  bytes 39264 (39.2 KB)
    RX errors 0  dropped 0  overruns 0  frame 0
    TX packets 468  bytes 85039 (85.0 KB)
    TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

Why doesn't the Ubuntu machine assign an IPv4 network address to the Raspberry Pi zero?

ping6 fe80:0000:3c1:11d6:f2aa:fe13

ping: fe80:0000:3c1:11d6:f2aa:fe13: Name or service not known

Thanks for any hints

1 Answer 1


Answering to myself: I found the answer now (actually I don't really know, why it works, but it works).

  • Open Network Settings. If the Zero is connected and active, you'll find an entry for "USB Ethernet" Ubuntu network settings

  • Click the Settings-Button on the lower right.

  • Go to the "IPv4" Tab and change "addresses" to "Link Local only"
  • Go to the "IPv6" Tab and turn it "Off".

After a few seconds, the network will say "connected", and then you can ssh to the zero with "ssh [email protected]"

Still, the Pi doesn't have internet connection. A network bridge would be necessary for that.

  • Please accept this answer, if a better one doesn't appear. You should be able to do this tomorrow afternoon. Not only will it prevent this from reappearing over and over, but it will increase your reputation.
    – NomadMaker
    Jul 11, 2022 at 18:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.