5 April 2020

Enabling SSH on Raspberry Pi

Raspbian ships with the SSH server disabled by default. Which is an excellent security baseline. However if you want to be able to remotely connect to your RPi, you’re going to need to enable it. Thankfully, it can be manually enabled from the desktop very easily.

Note: When enabling SSH on a Pi, or any device, you should change its default password to ensure that it remains secure. Especially if you are connecting that device to the internet.

These instructions are straight from the RPi documentation (which can be found here).

Launch “Raspberry Pi Configuration” from the “Preferences” menu
Navigate to the “Interfaces” tab
Select “Enabled” next to “SSH”
Click “Ok”

Alternatively, raspi-config can be used in the terminal:

Enter “sudo raspi-config” in a terminal window
Select “Interfacing Options”
Navigate to and select “SSH”
Choose “Yes”
Select “Ok”
Choose “Finish”

Alternatively, use systemctl to start the service

sudo systemctl enable ssh
sudo systemctl start ssh

The one special use case regarding enabling SSH that is not covered above is running your RPi “headless”. Which simply means that you are using the RPi without a display plugged into it.

For headless setup, SSH can be enabled by placing a file named “ssh”, without any extension, onto the boot partition of the SD card from another computer. When the Pi boots, it looks for the “ssh” file. If it is found, SSH is enabled and the file is deleted. The content of the file does not matter; it could contain text, or nothing at all.

If you have loaded Raspbian onto a blank SD card, you will have two partitions. The first one, which is the smaller one, is the boot partition. Place the file into this one.


Now you can use your favorite SSH tool to console into your Raspberry Pi device remotely.

I mostly work on Windows machines, and my go to SSH tool is called “Putty“. However, there’s LOTS of different SSH programs out there.
So… do some googling, try a few, and use whichever one you like best.


Going headless? See my article on setting up WiFi on a headless RPi


If you happened to this post by following my either of my series about Pi-Hole or PiVPN, then click the following link to go to the next step: Part 2: Installing Pi-Hole

Tags: , , , , ,
Copyright 2022. All rights reserved.

Posted April 5, 2020 by IT.G.c in category "Linux", "RaspberryPi", "Raspbian

Leave a Reply

Your email address will not be published. Required fields are marked *

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