Enabling SSH on Raspberry Pi OS for remote use

In this tutorial we are looking how to enable SSH on Raspberry Pi OS, so that you can use terminal/shell remotely from your computer with PuTTY and other terminal emulators. There are multiple different ways to do this, and you have to only choose whats easiest in your situation. This tutorial is tested with the Raspberry Pi 3/4 and Raspberry Pi OS Lite (32bit) that is released in 2020-12-02.
Raspberry Pi OS default username, password and host
Because i know someone will ask it, it will better to start with it. The default username is pi, default password is raspberry, and default hostname is raspberrypi. And do you know what? If your Raspberry is connected to public network then you should change the default password to something else. You can change the password from here sudo raspi-config.
Enable SSH by creating SSH file directly on the SD card
1. Connect Raspberry Pi SD card to card reader and connect it to your computer. If Windows asks "Do you want to format this drive?" select Cancel.

2. Go to My Computer (This PC) and open the drive that says "boot".

3. When you are inside the drive, right-click somewhere and create new Text Document.

4. Name the file "ssh" without any extension.

5. Remove SD card from card reader and put it back to Raspberry Pi, and you are good to go.
Enable SSH locally from terminal
If you are using desktop version of Raspberry Pi OS, you can find terminal from here.

1. Enter the config tool by writing: sudo raspi-config

2. Select Interface Options.

3. Select SSH.

4. Select Yes. Remember to change your password if you are connected to public network.

Enable SSH locally from desktop
1. Go to Preferences > Raspberry Pi Configuration.

2. Open Interfaces -tab and enable ssh.

Connect to Raspberry Pi terminal/shell using PuTTy
1. Download PuTTY from this page: https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html.
2. You can use Raspberry's IP address or it's hostname. Default hostname is raspberrypi.

0 Comments