Most of those among us dealing with the little, but extremely capable Raspberry Pi will know this: You get hands on your new device and prepare the Micro-SD-card with Raspbian. So far, so good. Afterwards you place the Pi in some place where it should do its work, mainly without monitor and keyboard attached and... finally fail to connect via SSH (daily business). Unfortunately, SSH is disabled by default in each Raspbian-installation since 2016.

The situation is clear: After the initial deployment of Raspbian and working with "raspi-config" we have dealt with many important aspects: Resizing the system to use the whole Micro-SD-capacity, setting the keyboard layout, changing the standard password of the "pi"-user but the remote access via SSH was simply forgotten. According to Murphy's Law, you often recognize such facts when the device has been already placed somewhere without reach.

Usually, there are more known ways to get rid of this state quite fast, two of them are my favourite options: The first one is to think before you're ready with "raspi-config": In the main menu, select "Advanced Options", navigate to and select "SSH", choose "Yes", select "OK" and finally choose "Finish" - that's it in case you have your mind with you BEFORE putting the Pi in the wild. Of course changing the standard "pi"-password is a recommended prerequisite wether you connect your Pi to the internet or leave it in the LAN.

In the second scenario, the Pi is already deployed and the dices have fallen: Connectivity is available, SSH not. So head to the Pi (there's really no other way!), remove its power and the Micro-SD card. Now head to a computer where you can insert the card so that you see the "boot"volume being mounted. In the directory shown here all you need to do to enable SSH is to create an empty file named "ssh".

Enable SSH on a Raspberry Pi

Sounds strange, works great - the file does not need to have any contents. Just create the empty file, safely eject the Micro SD-card, put it in your Raspberry Pi again and fire the device up. The next try to connect via SSH should turn out to work fine - a connection can now be established:

Working SSH to a Raspberry Pi

That's it. SSH is now enabled on startup and you can remotely manage your device with this well-known tool. Just in case you use the desktop version of Raspbian with a graphical interface you may also enable SSH from here. In all other cases (and the usual deployment scenarios) these two options should work fine: According to me, the SD-card trick is the best one as I always seem to forget to enable the service during the initial install so it may work fine for you, too!