Enable SSH on Raspberry Pi OS Without a Monitor

This quick guide will show you how to enable SSH on Raspberry Pi OS without a monitor.

Raspberry Pi OS Enable SSH without a monitor

Since 2016 Raspberry Pi OS has had its SSH server disabled by default. This change was done to help the security of recently set up devices, preventing bad actors from abusing open devices.

While you can easily enable SSH through the terminal or the desktop interface, this process changes when you don’t have a spare monitor and keyboard.

Over the following few sections, we will show you a couple of different ways to enable SSH on the Raspberry Pi without a monitor.

These methods are all relatively straightforward as long as you have a computer capable of reading a micro-sd card.

Equipment

Below is a list of the equipment we used when we enabled SSH without a monitor on our Raspberry Pi.

Recommended

Optional

We test this method using the latest version of Raspberry Pi OS. However, these steps should work on all releases of Raspberry Pi OS since 2016.

Enabling SSH on a Raspberry Pi without a Monitor using the Boot Directory

This section will show you how you can enable SSH on a Raspberry Pi without a monitor by adding a file to its boot partition.

When the Raspberry Pi foundation changed the operating system not to have SSH enabled by default, they added a backup method. This method allows you to create a file within the boot partition to tell the operating system to enable SSH.

If you are using a fresh install, it will be far easier to flash the operating system again using Raspberry Pi Imager and enable SSH within that tool.

1. Before beginning, ensure your Raspberry Pi is powered off and that you have removed the SD card from the machine.

You then need to plug the SD Card into your computer’s SD card reader, if it has one.

2. With the SD Card plugged into your device you will need to find where the system mounted the boot partition.

  • On Mac OS this partition will likely be mounted to the “/volumes/boot/” directory.
  • On Linux, this depends on the operating system, but drives are often mounted within the “/mnt/” directory.
  • On Windows, the easiest way to find out is to open “My Computer” or “This PC” and note the drive letter as shown below.
Find Drive letter on Windows

3. Once you know where the SD card was mounted, open up your device’s terminal.

You can open the terminal on Windows by pressing WINDOWS KEY + R, typing in “cmd“, then pressing the ENTER key.

On Mac OS, press COMMAND + SPACE BAR to open spotlight, then type in “terminal“, then press the ENTER key.

On Linux systems, you can typically open the terminal by pressing CTRL + ALT + T.

4. With the terminal open you can now navigate to your Raspberry Pi’s boot directory so that you can enable SSH without a monitor.

On Linux and Mac OS, you can navigate to the mounted boot partition using the cd command as shown below.

cd /volumes/boot/

On Windows, you simply need to type in the drive letter where the operating system mounted the boot partition.

H:

5. Now that we are in the boot partition, we can create our SSH file that will enable SSH on our Raspberry Pi. This method saves you from finding a monitor to attach to your device.

On Linux and Mac OS, we can use the handy touch command that allows us to create an empty file. Using the following to create this empty “ssh” file.

touch ssh

To create this empty file on a Windows system, you will want to use the following command.

type nul > ssh

6. You have now successfully enabled SSH on Raspberry Pi OS without a screen attached to the device. Plug your SD card back into your Pi and power it on.

During startup, it will run through the process of starting up the SSH service.

Enabling SSH Through the Raspberry Pi Imager

The easiest way to enable SSH on your Raspberry Pi without a monitor is to use the official Raspberry Pi Imager tool.

Before you write Raspberry Pi OS to an SD card, this application allows you to enable SSH and set the username and password you want to use. This solves all of the hassles of going into the boot partition and changing things yourself.

1. With the Raspberry Pi Imager open, you will need to have your chosen OS and storage device selected, as we have below.

In the bottom-right corner, you will see a cog. Click the cog to open up the settings page.

Open Raspberry Pi Imager Settings

2. Now that you are within the settings page, you can enable SSH for your Raspberry Pi without attaching a monitor.

Ensure the “Enable SSH” checkbox is ticked (1.).

While on this page, you will also want to set a custom username and password for your system (2.).

Finally, once both SSH is enabled and you have set a username and password, click the “Save” Button (3.)

Enable SSH on Raspberry Pi without monitor

3. You can now write the Raspberry Pi OS image to your SD card. When you plug your SD card into your Raspberry Pi and power it on, you will find that SSH has automatically been enabled.

Conclusion

Hopefully, at this point, you will have managed to enable SSH on Raspberry Pi OS without using an attached monitor.

These steps are relatively straightforward and will work as long as you are using the official Raspberry Pi operating system.

Please comment below if you have any issues with getting SSH to enable.

We also have many other Raspberry Pi guides that will help you set up your device.

2 Comments

  1. Avatar for nope
    nope on

    how do you find the ip address of the pi so you can ssh into it?

    1. Avatar for Emmet
      Emmet on
      Editor

      Hey,

      The easiest way would be to check through your router. Most routers provide a list of devices alongside the IP address its assigned to it.

      Without this things do become a bit more difficult without a monitor.

      Cheers,
      Emmet

Leave a Reply

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