Raspberry Pi SSH on Initial Boot.

Today I wanted to set up my little Raspberry Pi after some messing around with configs. As usual I copied the Raspbian ISO image to the SD card on my Mac, put it into the Pi and booted. I run it headless, which means I have no other way to control it than connecting via SSH.

This did not work. I could not connect to the Raspberry Pi on its usual IP address. Consulting the log files of my DHCP server revealed that the Pi did get an IP address. And it was the one from before. Also a ping from my Mac was positive! This obviously meant that the Pi just didn’t start an SSH deamon. But why? Last time I set it up it worked immediately.

So, after much googling I found a link to an official Raspberry Pi blog post that they, for security reasons, disabled the SSH server by default. The solution is to create a file on the SD card with the name ssh. Once I did that the Pi booted and I could connect via SSH. It makes sense. But it’s just not very obvious.