How to SSH into Raspberry Pi from Windows, Mac, and Linux

Access Raspberry Pi remotely

The Raspberry Pi is a low-cost, configurable computer used to explore electronics and Internet of Things programs. To control the Raspberry Pi computer remotely, use SSH connection to access the Linux command line from your Windows desktop computer. SSH (Secure Shell), network protocol allows you to establish connection with another server. SSH protocol provides a secure connection over an insecure network. When using SSH into your Raspberry Pi, you can access and control it from the same network or a different network. 

Enable SSH on Running Raspberry Pi OS for Remote Access

In most Raspberry Pi OS SSH is disabled for security reasons, by default. Hence to connect to your Raspberry Pi remotely from another network, you have to enable it:

These steps is suitable for pre installed Raspberry Pi which is running. For this connect Raspberry Pi to your computer.

Open the Raspberry Pi terminal, run this command

sudo raspi-config

Then find the interfacing option and press enter.

Select to SSH and press enter.

Select finish. Close the window.

Alternative Method:

You also enable SSH on already running Raspberry pi OS. Firstly connect your Raspberry Pi to monitor, then access Raspberry Pi icon Menu in the desktop. After this go to Preference, then Select Raspberry Pi configuration. Then Open Interface Tab and click on Enable for SSH. 

Enable SSH on Raspberry Pi

This step is used in freshly installed Raspberry Pi by using Pen drive and CD: 

Select the “Advanced setting” in the Raspberry tool

Enable SSH, and set username and password.

Filling details of network (LAN, WAN, MAN). Save the setting.

Reboot the system to make the change apply.

Note: By default the name ‘pi’ and password ‘raspberry’.

Find the IP Address of Raspberry Pi

The hostname of Raspberry by default is raspberrypi or either raspberry.local

To find the IP address of your Raspberry Pi execute this command in the terminal

“hostname -I”

Use SSH to connect your Raspberry Pi

Now you have both the hostname and IP address of Raspberry Pi. You are now ready to connect Raspberry Pi via SSH from different operating system:

SSH into a Raspberry Pi from Windows

Install PuTTY and open it. ( PuTTY is a free and open source SSH client for Windows)

Enter the Hostname or IP address of the Raspberry Pi in the Host Name section.

Select the connection type to SSH. Set port to 22.

Click on Open, and enter  username and password when prompted.

SSH into Raspberry Pi from MAC

Open terminal. Go to finder> search utilities>terminal.

Enter ssh [username]@[IP address] or ssh[username]@[hostname].local. Enter Raspberry Pi IP address and username in the IP address and username section.

SSH into Raspberry Pi from Linux

Open terminal window (Ctrl+Alt+t)

Enter ssh [username]@[IP address].local or ssh [username]@[hostname] . Fill details of Raspberry Pi in IP address and username section.

SSH is a secure method for remotely accessing and controlling Raspberry Pi. Now you know how to enable SSH, find IP address, and connect to Raspberry Pi from the different systems by the terminal window.