Building the Raspberry Pi Server

Setting up SSH

Secure Shell (SSH) is a protocol that allows us to remotely access another device on the same network. We will use SSH to login the Pi and control it without a display, mouse, or keyboard.

By default, on the newer versions of Raspberry Pi OS / Raspbian, SSH has been disabled for security. We will need to place an empty file with no extension called “ssh” in the root (the top directory of a folder or drive) of the “boot” partition. When the Pi first boot (starting up), the operating system will locate the ssh file and enable SSH. If you have missed this step, you may have to start over from flashing the Raspberry OS on your microSD card again.

If you are running an operating system other than Windows 10 or Linux, you may need to Google for how-to’s if the instructions below doesn’t work for you. After we set up the terminal, which operating system we use won’t matter.

Open any text editor and save a blank file as “ssh”. This file should not have any file extension, such as “.txt”.

On Windows, when you are saving the file, under “Save as type”, choose “All types (*.*)”. In the file name, type “ssh” with the quotes.

If your file still has a “.txt” extension on it, in your file explorer, go to the toolbar and click on “View”. Mark the checkbox next to “File name extensions”. Now, you will be able to see the extension of your file. Right-click on the file, and rename your file without the “.txt”.

On Linux, extensions are not hidden and you can easily see whether your file has an extension or not. Rename the file if it does.

Place the ssh file in the root of the “boot”partition if you did not save the file there already.