EdgePiecePlease
Posts: 9
Joined: Wed Dec 26, 2018 11:11 pm

Can't SSH into headless Pi using PuTTY

Sat Oct 12, 2019 5:23 am

Hi!
I'm trying to SSH into my Pi ZeroW using PuTTY but I keep getting the following fatal error:
No supported authentication methods available (server sent: publickey)
I just set up the Pi with a fresh image of Raspbian Buster Lite. I'm using Bonjour to connect to the Pi headless via USB. I made sure to add dtoverlay=dwc2 to the config.txt. I also added modules-load=dwc2,g_ether to cmdline.txt.

I've tried several times and made sure to create the ssh file in the boot directory each time. I'm using pi as the username when PuTTY gives the ''login as:'' prompt.

Am I doing something wrong? How do I fix this error?

UPDATE:
I used to use this Pi with Raspbian Stretch and it worked perfectly. I had stopped using it so I did a clean new install with Raspbian Buster. I did some research and came across Debian's release notes for Buster. Release note 5.1.3 specifically mentions sshd failing to authenticate. I don't know if this is related to my problem, but thought I'd mention it.

Here's the link I read the release notes at: https://www.debian.org/releases/buster/ ... ml#idm1263
Last edited by EdgePiecePlease on Sat Oct 19, 2019 3:11 am, edited 2 times in total.

User avatar
HawaiianPi
Posts: 4859
Joined: Mon Apr 08, 2013 4:53 am
Location: Aloha, Oregon USA

Re: Can't SSH into headless Pi using PuTTY

Sat Oct 12, 2019 8:33 am

Worked for me just now with the latest buster Lite.

Here's the latest Raspbian Buster Lite 2019-09-26 image with the USB Ethernet Gadget Mode edits pre-applied.
https://drive.google.com...2019-09-26-raspbian-buster-lite_Pi0USB.zip

Tested on my Pi Zero W and my Windows 10 gaming laptop with PuTTY.

Give it a try on your system and let us know if it works.

Notes:
You need to connect the Pi Zero to your main PC with a normal micro USB data cable plugged into the Pi Zero's USB data port, which is the one closest to the HDMI port, and nothing should be connected to the Pi Zero's power port.

Assuming you are using Windows, you should see a new USB Ethernet/RNDIS network adapter in Device Manager.

The Pi Zero can take over a minute to boot the first time, so wait 90 seconds or so before you try and SSH in.
My mind is like a browser. 27 tabs are open, 9 aren't responding,
lots of pop-ups...and where is that annoying music coming from?

EdgePiecePlease
Posts: 9
Joined: Wed Dec 26, 2018 11:11 pm

Re: Can't SSH into headless Pi using PuTTY

Sat Oct 12, 2019 6:43 pm

HawaiianPi wrote:
Sat Oct 12, 2019 8:33 am
Worked for me just now with the latest buster Lite.

Here's the latest Raspbian Buster Lite 2019-09-26 image with the USB Ethernet Gadget Mode edits pre-applied.
https://drive.google.com...2019-09-26-raspbian-buster-lite_Pi0USB.zip

Tested on my Pi Zero W and my Windows 10 gaming laptop with PuTTY.

Give it a try on your system and let us know if it works.

Notes:
You need to connect the Pi Zero to your main PC with a normal micro USB data cable plugged into the Pi Zero's USB data port, which is the one closest to the HDMI port, and nothing should be connected to the Pi Zero's power port.

Assuming you are using Windows, you should see a new USB Ethernet/RNDIS network adapter in Device Manager.

The Pi Zero can take over a minute to boot the first time, so wait 90 seconds or so before you try and SSH in.
I used the image you provided, and added the "ssh" file to boot. I'm still not able to SSH into the Pi! When I open device manager there was no
USB Ethernet/RNDIS gadget either. I am, however, able to ping "raspberrypi.local" from command prompt, and get pinged back. Whenever I open Device Manager, I simply see "Detection Verification" under "Other Devices"
Here's a screenshot:
https://drive.google.com/file/d/1TvYocm ... sp=sharing

Andyroo

Re: Can't SSH into headless Pi using PuTTY

Sat Oct 12, 2019 7:27 pm

Does your router restrict clients accessing other WiFi clients?

I’ve three recent builds working fine...

EdgePiecePlease
Posts: 9
Joined: Wed Dec 26, 2018 11:11 pm

Re: Can't SSH into headless Pi using PuTTY

Sat Oct 12, 2019 10:56 pm

Andyroo wrote:
Sat Oct 12, 2019 7:27 pm
Does your router restrict clients accessing other WiFi clients?

I’ve three recent builds working fine...
My apartment complex does not provide routers to each resident; instead each resident has to go into an online portal and authorize certain devices to join the network by entering their MAC addresses. It's a stupid system and I do not know my Pi's MAC address.
Using the Pi in RNDIS gadget mode is really my only option.

Andyroo

Re: Can't SSH into headless Pi using PuTTY

Sat Oct 12, 2019 11:13 pm

You can find the Pi MAC address by

Code: Select all

ifconfg
Then just select the interface you need to register.

EdgePiecePlease
Posts: 9
Joined: Wed Dec 26, 2018 11:11 pm

Re: Can't SSH into headless Pi using PuTTY

Sun Oct 13, 2019 4:14 am

Andyroo wrote:
Sat Oct 12, 2019 11:13 pm
You can find the Pi MAC address by

Code: Select all

ifconfg
Then just select the interface you need to register.
The Pi doesn't show up when I use

Code: Select all

ipconfig
(I'm on Windows). I think the problem is with my PC, even in Device Manager, Windows can't tell what kind of device the Pi is.

User avatar
HawaiianPi
Posts: 4859
Joined: Mon Apr 08, 2013 4:53 am
Location: Aloha, Oregon USA

Re: Can't SSH into headless Pi using PuTTY

Sun Oct 13, 2019 5:17 am

EdgePiecePlease wrote:
Sat Oct 12, 2019 6:43 pm
I used the image you provided, and added the "ssh" file to boot.
The "ssh" file should have already been there (I added it when editing the image). The image is burn-n-boot (you don't need to do anything). Are you sure you burned the correct image?

I'm still not able to SSH into the Pi! When I open device manager there was no USB Ethernet/RNDIS gadget either.
If you're sure you are using my image, and Windows is not installing the USB Ethernet driver, then something is wrong with your Windows. Which version of Windows are you using?

You can try this driver (all the details match the driver installed by my Win10 system).
Other hardware - Acer USB Ethernet/RNDIS Gadget.
2019-10-12.png
2019-10-12.png (18.72 KiB) Viewed 358 times
I am, however, able to ping "raspberrypi.local" from command prompt, and get pinged back.
Do you have any other Raspberry Pi computers on your network with the default hostname (might be getting pingback from another Pi)?
My mind is like a browser. 27 tabs are open, 9 aren't responding,
lots of pop-ups...and where is that annoying music coming from?

Return to “Beginners”