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:
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.
It’s that simple, just change the “K” (kill) for an “S” (start) in the appropriate runlevel for the service you want to change.