2

SSH is disabled by default for security, which is annoying for a headless RPi. The usual trick was to create an empty ssh file in /boot/ which was possible even from Windows, because the boot partition is visible.

Now (I tried with Raspbian Stretch Lite) it doesn't seem to work anymore, and this is confirmed by this comment here:

I tried the headless setup on Raspbian Stretch Desktop from 2018-03-14 and it doesn't seem to be working anymore, was working with previous versions. – JBaczuk Apr 3 '18 at 18:36

and also here:

Does NOT work on November raspbian stretch – decades Jan 25 '18 at 15:18

How to do it today? (I'm looking for a solution working from Windows)

Basj
  • 800
  • 3
  • 21
  • 49

1 Answers1

3

I've tested this today with the current image (image dated 2019-04-08), and it does indeed still work.

The file should be named either "ssh" or "ssh.txt", and put in the (first) partition which shows up as named "boot" - but not in a subfolder within this. If you see kernel7.img and cmdline.txt you're in the right place - it goes along-side those, and nowhere else.

Some troubleshooting tips:

  • If the file is correctly parsed, it will also disappear from /boot. If it's disappearing and you still can't reach ssh, the most probable issue is that you're not finding the correct IP for it.
  • Verify the card is actually booting correctly (this can take several minutes on the first boot). hdmi would be easiest. Another clue would be a distinct lack of activity from the green LED. If you load the card in your preferred partition editor, you should see almost no free space after the second partition (the partition is expanded on the first boot. If it hasn't been expanded, either the sd card is faulty or the image wasn't written correctly.)

To directly answer the question, the feature still exists as documented. If you want to verify for yourself, you can find it implemented in /lib/systemd/system/sshswitch.service.

Shaun
  • 146
  • 3