Enable SSH server in a headless Raspberry Pi

Raspbian come by default with SSH server deactivated so if you have a headless Raspberry Pi you won’t be able to access it. The easy way to activate SSH server without even powering on the device is by editing one file in the system partition of the SD card.

As you may know services in Raspbian are started and stoped depending on what runlevel you are booting into. Those runlevel/service relations are configured by SysV Init in /etc/rcX.d folders were X are the numbers from 0 to 6, each for one runlevel. Raspbian’s default runlevel is 2 so if you go to /etc/rc2.d in your SD card’s ext4 partition (not the boot partition in FAT32 format) you’ll see somethin like this:

Raspbian K01ssh

That “K” in K01ssh means “kill”. So SSH is not going to be started in runlevel 2. If you change that symlink name to S01ssh SSH server will “start” on boot.

Raspbian S01ssh

It’s that simple, just change the “K” (kill) for an “S” (start) in the appropriate runlevel for the service you want to change.

You might also like

Make Raspbian run from an external USB hard drive or USB memory stick
Raspberry Pi can ONLY boot from the SD Card. If you want to use your Raspberry Pi from an external USB...

Make Raspbian run from an external USB hard drive or USB memory stick
Raspberry Pi can ONLY boot from the SD Card. If you want to use your Raspberry Pi from an external USB...

Make Raspbian run from an external USB hard drive or USB memory stick
Raspberry Pi can ONLY boot from the SD Card. If you want to use your Raspberry Pi from an external USB...

TP-Link TL-WN725N version 2 in Raspberry Pi
Version 2 of TP-Link TL-WN725N driver doesn't come by default in Raspbian so it won't work by just plug-ining...

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.