6

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
Matt
  • 107
  • 4
Arlo
  • 211
  • 1
  • 2
  • 10

5 Answers5

4

I've figured out the issues and got in, here's how I did it.

The Raspberry Pi can only connect to 2.4GHz networks. I had properly configured the wpa_supplicant.conf file, but I specified a 5GHz network instead of 2.4GHz.

I do not know why it was asking for pi@192.168.0.102's password when that user did not exist on that device, but don't let it fool you, just because it shows the user does not mean that the user exists on the machine you're connecting to.

I connected to my Windows machine with g_ether, and was able to SSH into the pi from raspberrypi.local over USB. From there, I eventually decided to attempt to Remote desktop in. Since I didn't have internet on the Pi, I couldn't use apt-get. Therefore, I manually installed RealVNC Server with dpkg from here (You need the Full version of Raspbian, not Lite). Using MobXTerm, I was able to transfer the .deb package to the Pi over SSH

After the server was installed on Raspbian Full, I connected to raspberrypi.local from the RealVNC client. From there, I could see a list of WiFi networks. Or the 2.4GHz networks, at least. I simply connected to my other network, used ifconfig to get the IPv4 address, and was able to SSH into the Pi over WiFi. Problem solved!

Arlo
  • 211
  • 1
  • 2
  • 10
0

Trying to SSH in with raspberrypi@ip.address will fail as there is no default user name called raspberrypi.

SSH with pi@ip.address will work

Pi Documentation here: https://www.raspberrypi.org/documentation/remote-access/ssh/windows10.md

0

For me it was quite simple: I always tried to ssh using pi@<ip-address> not realizing pi being the user I am trying to log in as. Since this user did not exist, all password attempts were futile.

The command is:

ssh <username>@<ip-address>
Ben
  • 1
0

I found myself puzzled with the password too most of the times. The issue was that my keyboard layout was wrong, so I tried typing "raspberry" while I really typed "raspberrz". Maybe check your keyboard layout. Also double check if SSH really is enabled in the "sudo raspi-config" menu. Edit: Oh sorry, I really overread the part where you wrote that you found the solution.

MeebusJaximus
  • 101
  • 2
  • 2
  • 8
-1

In my experience, trying to headless is a pain the (insert preferred body part here), and you would be better off just using HDMI or similar to set up the Pi, change the password, and then try SSH-ing into it.

Lucas Thelen
  • 95
  • 1
  • 5