Skip to main content
edited tags
Link
Ingo
  • 43.1k
  • 20
  • 87
  • 207
Source Link
Crit
  • 21
  • 3

Cannot ssh into Raspberry Pi Zero W over wifi after enabling ssh

I'm trying to set up my Zero W to use as a headless server, so I've taken the following steps:

  1. Flashed Raspbian Buster Lite onto the SD card
  2. Put a file named wpa_supplicant.conf in the boot/ directory with the details for my home's wifi network
  3. Put a blank file named ssh in the boot/ directory

The Pi boots up, and I can find what I'm pretty sure is the right IP address with nmap, since it says the MAC address is Pi-related:

MAC Address: B8:27:EB:6B:8F:D0 (Raspberry Pi Foundation) Nmap scan report for 192.168.10.116 Host is up. 

But I can't seem to ssh in with that IP address, and I always get Connection Refused:

ssh -vvv [email protected] OpenSSH_7.6p1 Ubuntu-4, OpenSSL 1.0.2n 7 Dec 2017 debug1: Reading configuration data /etc/ssh/ssh_config debug1: /etc/ssh/ssh_config line 19: Applying options for * debug2: resolving "192.168.10.116" port 22 debug2: ssh_connect_direct: needpriv 0 debug1: Connecting to 192.168.10.116 [192.168.10.116] port 22. debug1: connect to address 192.168.10.116 port 22: Connection refused ssh: connect to host 192.168.10.116 port 22: Connection refused 

I've put the ssh file into the boot/ directory several times now, and it always disappears when I put the SD card back into my computer, so I assume something is checking it. But I'm not able to connect. Any help?