How to Connect to a Raspberry Pi Remotely Using SSH

Having to connect a monitor, keyboard and mouse up to your Raspberry Pi every time you want to use it can be a real pain! Why not connect to and use your Pi remotely? One way of doing this is via SSH (Secure Shell), it's a cryptographic network protocol for operating network devices securely. It's really handy for when you've got a Pi setup doing a task or in a case and you only need access to the terminal functionality on the Pi. Follow these steps and you'll be all set up and ready to connect to your Pi using SSH in no time!

1) Enable SSH

First, you need to enable SSH functionality on the Raspberry Pi in order to be able to connect to it using this method. It is enabled in the Raspberry Pi configuration settings, this can be found by entering "sudo raspi-config" into the terminal. Select Interfacing Options and then SSH, click enter when this is highlighted and select Enable. You will then need to navigate to the Finish option to exit the options menu.

2) Find the IP address

In order to connect to the Raspberry Pi via the local network, you'll need to know the devices IP address. This can be found by looking at the devices networking information using the "ifconfig" command.

 If you're connected to the internet via WiFi then you'll need the IP address in the wlan0 section and if you're using an ethernet cable then you'll need the one displayed in the eth0 section. The local IP address should look something similar to this 192.168.X.XX. Make a note of this number as we'll need it in the next step.

 

3) Connect to the Pi using SSH

There is a range of different programs you can use to connect to the Pi via SSH. If you're on Windows we'd suggest using PuTTy and if you're on a MacOS device we'd suggest using the built-in Terminal.

For PuTTy:

Open up PuTTy, the default screen should be for starting a new connection. All you have to do is enter the IP address for the Raspberry Pi that we found in the previous step and enter the Port number as 22. Then hit open and a terminal window should pop up prompting you to enter the devices username and password, if you've not changed these then the default if username: pi, password: raspberry.

For MacOS Terminal:

Open a terminal window, this can be done using the spotlight search (cmd +space). Then enter "ssh pi@192.168.X.XX" using the IP address found earlier, once entered you'll be prompted to enter the Raspberry Pi's password. If entered correctly you'll be greeted with the usual command line.

 

Previous article How to Use a Potentiometer With an Arduino
Next article What is the Arduino Bootloader?

Check out our latest products...

BBC micro:bit Watch - Smart Coding Kit (micro:bit not included) - Micro:bit
24V Power Adapter - DC24V - 5A - Power

24V Power Adapter - DC24V - 5A

£16.99 inc VAT
£14.16 ex VAT
OpenMV Cam H7 Telephoto Lens - Accessories

OpenMV Cam H7 Telephoto Lens

£5.99 inc VAT
£4.99 ex VAT
OpenMV Cam H7 Ultra Wide Angle Lens - Accessories

OpenMV Cam H7 Ultra Wide Angle Lens

£17.99 inc VAT
£14.99 ex VAT
OpenMV Cam H7 IR Lens - Cameras

OpenMV Cam H7 IR Lens

£5.99 inc VAT
£4.99 ex VAT
OpenMV Cam H7 Case - Accessories

OpenMV Cam H7 Case

£7.99 inc VAT
£6.66 ex VAT
Lightning Detector - AS3935 (Qwiic) - Sensor

Lightning Detector - AS3935 (Qwiic)

£20.99 inc VAT
£17.49 ex VAT
Qwiic Keypad - 12 Button - Qwiic

Qwiic Keypad - 12 Button

£8.99 inc VAT
£7.49 ex VAT