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 [email protected], 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 [email protected]'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 [email protected]. 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
12
  • Not sure, but maybe it's just the wrong keyboard layout. Germans have to type raspberrz because y and z are switched on GB and DE keyboards.
    – framp
    Dec 18, 2017 at 18:03
  • I'm using U.S. Keyboard layout
    – Arlo
    Dec 18, 2017 at 18:18
  • What OS is your client computer? ... GNU/Linux distro? Windows? Mac? Dec 18, 2017 at 18:29
  • I've tried using Mac (iTerm), Windows (Putty), and Android (Termux with openssh installed). Same result on every machine.
    – Arlo
    Dec 18, 2017 at 18:42
  • 1
    I connected the Pi directly to my Mac and connected to [email protected] 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, 2017 at 22:22

5 Answers 5

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 [email protected]'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!

2
  • 1
    So it sounds like 192.168.0.102 turned out to be the IP address of something other than the Pi Zero. This tends to be a first culprit when troubleshooing most headless scenarios (see the part buried in that question's comments that says "Hello @jdonald. So I don't think I have the right IP address for the raspberry pi". One thing that wasn't resolved is why internet connection sharing never worked via g_ether, but glad this piece wasn't necessary in the end.
    – jdonald
    Dec 28, 2017 at 1:29
  • Hi, Arlo, I connected the PI with an ethernet cable to my iMac. To know the IP address of PI I checked the Ethernet connection in Network in System Preferences.So I typed ssh pi@EthernetIPAddress, I encountered the same problem like you but I don't want to install RealVNC Server like.Can you suggest something that suits my situation? Mar 10, 2018 at 11:09
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.

0

Trying to SSH in with [email protected] will fail as there is no default user name called raspberrypi.

SSH with [email protected] will work

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

3
  • There is no command like that in the question to begin with. Did you post your answer in the wrong place? Jan 4, 2021 at 12:08
  • This looks like you may have mis-read the question. (I considered that possibly the original question was edited and did check the edit history). The OP writes that they are attempting to use the 'pi@...' user, which should exist as a default account unless it was disabled or removed. Jan 5, 2021 at 14:33
  • Apologies, I misread the original question. :-( Jan 5, 2021 at 15:55
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>
-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.

14
  • I don't have a Mini HDMI adapter
    – Arlo
    Dec 18, 2017 at 18:58
  • 1
    I've reinstalled Rasbian twice
    – Arlo
    Dec 18, 2017 at 20:14
  • 1
    Raspbian has no problem whatsoever with a US keyboard layout on the terminal, provided you configure it to use that instead of the preconfigured UK (IIRC) layout. Dec 18, 2017 at 20:50
  • 1
    Now that the password has worked (at least via g_serial/g_ether/g_multi) and it's back to WiFi troubleshooting, Lucas's answer may not be so far off. Generally users have more trouble troubleshooting wpa_supplicant.conf with the command line compared to the Pixel GUI. Similar to using HDMI, @Chuck Fecht can you try connecting to WiFi from within VNC? I'm assuming by this point you got internet connection sharing working over USB and hopefully have no trouble running apt-get.
    – jdonald
    Dec 20, 2017 at 17:18
  • 2
    Success!!! I've gotten my Pi set up and working. I had to install Raspbian Stretch full (not light) to install RDP, and it turns out the issue was that the Pi Zero W cannot connect to 5GHz networks, only 2.4gz. I connected it to my 2.4 network and it was smooth sailing from there. Thanks for everyone's help! I'll add an answer detailing my problem and solution later
    – Arlo
    Dec 25, 2017 at 19:52

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.