Raspberry Pi Knowledge Base

Enable ssh

Problem

If the ssh server is not running* on the destination machine, the following error messge is generated:

ssh: connect to host 192.168.1.134 port 22: Connection refused

*By default, Raspberry Pi OS disables the ssh server.

Solution

SSH can be enabled by placing a file named 'ssh', without any extension, onto the boot partition of the SD card.

if you are booted into the Raspberry Pi:

sudo touch /boot/ssh