I'm following Simple guide for setting up OTG modes on the Raspberry Pi Zero, the fast way!
What I've done;
- flashed latest (
2017-04-10) Raspbian image onto SD card, - added
dtoverlay=dwc2on new line toconfig.txt - created blank
sshfile (without any extension) on./bootpartition, - modified
cmdline.txtfile, by addingmodules-load=dwc2,g_etherright afterrootwait, - booted Raspberry Pi Zero, waited for 90 seconds and tried to
ssh pi@raspberrypi.localusingsshopenssh client withLinuxandPuTTYon Windows (Pi connected to PC using USB cable).
There was NO other changes made to SD card, other then what I mentioned above.
I'm able to ssh in from MacOS & Windows, but not from Linux:
$ ssh -v pi@raspberrypi.local
OpenSSH_6.6.1, OpenSSL 1.0.1e-fips 11 Feb 2013
debug1: Reading configuration data /home/alexus/.ssh/config
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 56: Applying options for *
ssh: Could not resolve hostname raspberrypi.local: Name or service not known
$
What am I missing?
$ ssh -V
OpenSSH_6.6.1p1, OpenSSL 1.0.1e-fips 11 Feb 2013
$ systemctl status avahi-daemon.service | grep Active
Active: active (running) since Tue 2017-04-25 12:04:30 EDT; 2h 14min ago
$ grep ^hosts /etc/nsswitch.conf
hosts: files mdns4_minimal [NOTFOUND=return] dns myhostname
$ avahi-browse --all --domain=local --verbose --terminate | grep -vE '(eno1|docker0|virbr0)'
Server version: avahi 0.6.31; Host name: X.local
E Ifce Prot Name Type Domain
: Cache exhausted
: All for now
$
Please advise.
* UPDATE *
NSSWITCH.CONF(5):
$ grep ^hosts /etc/nsswitch.conf
hosts: files mdns_minimal dns mdns myhostname
$
avahi-daemon.conf(5):
$ grep ^use-ipv /etc/avahi/avahi-daemon.conf
use-ipv4=yes
use-ipv6=yes
$
use-ipv6=yes is disabled by default. I un-comment that line followed by restart of avahi-daemon.socket & avahi-daemon.service, I now sometimes able to see following:
$ avahi-browse --all --domain=local | grep -vE '(docker0|virbr0|eno1)'
+ enp0s20u8 IPv6 raspberrypi [XX:XX:XX:XX:XX:XX] Workstation local
- enp0s20u8 IPv6 raspberrypi [XX:XX:XX:XX:XX:XX] Workstation local
$
per output above, raspberrypi entry comes and goes
avahi-daemon@Linux:
May 5 10:42:10 wcmisdlin02 avahi-daemon[8336]: Joining mDNS multicast group on interface enp0s20u7.IPv6 with address fe80::150b:ff04:b4e9:692e.
May 5 10:42:10 wcmisdlin02 avahi-daemon[8336]: New relevant interface enp0s20u7.IPv6 for mDNS.
May 5 10:42:10 wcmisdlin02 avahi-daemon[8336]: Registering new address record for fe80::150b:ff04:b4e9:692e on enp0s20u7.*.
May 5 10:42:54 wcmisdlin02 avahi-daemon[8336]: Withdrawing address record for fe80::150b:ff04:b4e9:692e on enp0s20u7.
May 5 10:42:54 wcmisdlin02 avahi-daemon[8336]: Leaving mDNS multicast group on interface enp0s20u7.IPv6 with address fe80::150b:ff04:b4e9:692e.
May 5 10:42:54 wcmisdlin02 avahi-daemon[8336]: Interface enp0s20u7.IPv6 no longer relevant for mDNS.
- enp0s20u7 IPv6 raspberrypi [XX:XX:XX:XX:XX:XX] Workstation local:
$ ssh -v pi@raspberrypi.local
OpenSSH_6.6.1, OpenSSL 1.0.1e-fips 11 Feb 2013
debug1: Reading configuration data /home/alexus/.ssh/config
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 56: Applying options for *
ssh: Could not resolve hostname raspberrypi.local: Name or service not known
$
+ enp0s20u7 IPv6 raspberrypi [XX:XX:XX:XX:XX:XX] Workstation local:
$ ssh -v pi@raspberrypi.local
OpenSSH_6.6.1, OpenSSL 1.0.1e-fips 11 Feb 2013
debug1: Reading configuration data /home/alexus/.ssh/config
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 56: Applying options for *
debug1: Connecting to raspberrypi.local [fe80::e0e0:f91:8e3:73b3] port 22.
debug1: connect to address fe80::e0e0:f91:8e3:73b3 port 22: Invalid argument
ssh: connect to host raspberrypi.local port 22: Invalid argument
$ ssh -6 pi@fe80::e0e0:f91:8e3:73b3%enp0s20u7 uname -a
Linux raspberrypi 4.4.50+ #970 Mon Feb 20 19:12:50 GMT 2017 armv6l GNU/Linux
$