My image: 2017-08-16-raspbian-stretch-lite
from here
My Raspberry Pi: Raspberry Pi Zero W
My computer: Linux (Fedora 26)
What I did
- I followed the official instructions on how to flash the img to a Micro SD card.
- Since I don't have an HDMI monitor, I need to be able to ssh into the device. So I followed this guide to be able to ssh into the Pi over USB. But although the Pi showed up as a new network interface that I was able to connect to, I was not able to resolve
raspberrypi.local
. The network interface also didn't seem have dhcp, so I got no IP form that device.
So I undid all the changes from that guide again. The Raspberry Pi Zero W already has WiFi, so I didn't bother continuing going through all the hassle... Then I edited my
/etc/wpa_supplicant/wpa_supplicant.conf
adding the following lines to the end of it:network={ ssid="SSID" psk="PASSWORD" }
It connected to my WiFi without a problem and I am able to ping it form my computer.
Now this official site says
If you want to enable SSH, all you need to do is to put a file called ssh in the /boot/ directory.
. So I added an empty file calledssh
to the boot partition of the micro SD card. And since that didn't work, I also added an empty file calledssh
to the other partition of the card, but into the directory/boot
. But it didn't work either. When I say It didn't work, I mean I can still ping it (raspberrypi.local
), but when I try to ssh into it I get this:fedora@localhost:~$ ssh [email protected] ssh: connect to host raspberrypi.local port 22: Connection refused
Connecting to other devices via ssh works just fine in my LAN. Using the IP instead of the hostname doesn't work either (same error). And omitting the username (
pi@
) also results in the same error. I also tried to ssh from different devices in my LAN; same error.
Any ideas what I could be doing wrong? I mean the Raspberry Pi is quite obviously running and even connecting to my WiFi and responding to pings. It seems like the ssh service is not running or maybe there is a firewall rule blocking port 22 on that device?
/boot
directory as the article claims or if it actually goes into the partition calledboot
?rasp-config
? And how would it be able to enable ssh on my Raspberry Pi?