I'm trying to set up a Raspberry Pi Zero W as a headless device on my local network, and am performing the initial setup with a fresh copy of Raspbian Stretch
I've tried installing both the latest Raspbian Stretch lite and the latest Raspbian Stretch with desktop, and was able to get it set up for SSH by configuring the wpa_supplicant.conf
file with WiFi credentials and creating an empty ssh
file.
I've tried SSH'ing in from multiple different computers, and the problem is the same every time. I log in with pi@192.168.0.102
, which I've confirmed to be the devices' IP Address. It asks for the password, so I type raspberry
, as per the online guides. It does not accept it. It will repeat the password:
field 3 times, then ask for pi@192.168.0.102's password:
.
At this point, I get "Permission denied, please try again". I get the same password query again, and upon entering it:
Received disconnect from 192.168.0.102 port 22:2: Too many authentication failures.
Authentication failed
Adding -v
for debug just shows it trying all my local private keys in my .ssh folder, which are for something else (so they don't work of course) and eventually falling back to publickey,password,keyboard-interactive
, where it asks for the password again.
I am absolutely certain that raspberry
is the correct password, as multiple online sources have confirmed it, and I am certain I've type it correctly (I even had a friend type it for me to no avail).
What's going on here?
Edit: I've tried from MacOS, Windows, and Android (Termux with OpenSSH installed), and I've tried connecting over USB instead of WiFi. The issue persists. Maybe there is some way to generate an SSH key for the pi? (I don't have a Mini HDMI converter so the GUI is not accessible)
Edit2: I was able to get into the terminal via USB OTG, and the default password worked. I changed the password. After some tinkering around (I'm not entirely sure what changed), I was able to SSH in via an emulated Ethernet over USB as pi@raspberrypi.local
. That means my real issue is with connecting to the WiFi - something I've already spent 2 hours trying to get work while connected with g_serial.
Edit3: I decided my best course of action was to try and set up a VNC server on the Pi. I was able to successfully share my internet from my work MacBook and SSH in. However, I'm getting errors while running sudo apt-get install tightvncserver
:
Err:41 http://mirrordirector.raspbian.org/raspbian stretch/main armhf tightvncserver armhf 1:1.3.9-9
Cannot initiate the connection to mirrordirector.raspbian.org:80 (2a00:1098:0:80:1000:75:0:3). - connect (101: Network is unreachable) [IP: 2a00:1098:0:80:1000:75:0:3 80]
ifconfig
for the USB ethernet connection returns this:
usb0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.2.3 netmask 255.255.255.0 broadcast 192.168.2.255
inet6 fe80::f87c:94fd:7b3e:454d prefixlen 64 scopeid 0x20<link>
ether 4e:38:f5:71:6e:74 txqueuelen 1000 (Ethernet)
RX packets 2080 bytes 214353 (209.3 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 1935 bytes 348268 (340.1 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
Pinging mirrordirector.raspbian.org
ping mirrordirector.raspbian.org
PING mirrordirector.raspbian.org (93.93.128.193) 56(84) bytes of data.
^C
--- mirrordirector.raspbian.org ping statistics ---
5 packets transmitted, 0 received, 100% packet loss, time 4151ms
pi
account under~/.ssh/authorized_keys
. – 0xC0000022L Dec 18 '17 at 20:53ssh pi@raspberrypi.local
or confirming that 192.168.0.102 goes offline the moment you depower the Pi. Another way to log in headless, assuming you don't have a three-pin serial cable, is g_serial. See https://raspberrypi.stackexchange.com/questions/67907/debugging-usb-otg-serial-on-the-pi-zero-w/75551 and yes you can generate an ssh key and place it under /home/pi/.ssh/ with Linux and an SD card reader. – jdonald Dec 18 '17 at 22:15pi@raspberrypi.local
and got the same result. I also tried installing Raspbian using PiBakery and telling it to set up with an SSH key, but it wouldn't take accept it (May have done that part wrong.) I will try debugging with USB OTG and see if that helps – Arlo Dec 18 '17 at 22:22/home/pi/.ssh/authorized_keys
and examining/var/log/auth.log
, I realize you have every OS except for desktop Linux. If your Mac has an SD card reader you can install Paragon ExtFS for Mac. Very curious as to what the eventual answer turns out to be. – jdonald Dec 19 '17 at 17:19raspberry
, and I successfully changed the password. However, even after changing the password, I am still unable to SSH into the pi. I am getting the same issue as before. I know I am trying to connect to the correct device because it gets far enough to ask for the password for the user 'pi'. – Arlo Dec 19 '17 at 19:02ssh pi@localhost
from within the serial console. You maytail -f /var/log/auth.log
when doing such tests too. If you need to test ssh from outside while still logged in from serial, useg_multi
instead ofg_serial
. (Note the usual caveat ofoptions g_multi file=/dev/mmcblk0p1
so that it doesn't complain about an invalid argument to mass storage.) Well, if your wireless is now confirmed working you might as well just use that and stick with g_serial. When you have more logs please edit your post accordingly to include them. – jdonald Dec 19 '17 at 20:38