Goal: Access the command line of a Raspberry Pi remotely from another computer or device on the same network using SSH.
Difficulty: Easy
Required Hardware:
- Network-Enabled Raspberry Pi w/ power supply and micro SD card
- Monitor and keyboard (Optional)
- Network-Enabled Windows, macOS or Linux computer w/ micro SD card reader
- Network-Enabled Smartphone or tablet (Optional)
Required Software:
- PuTTY (For Windows) - https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html
- Termius (For Android and iOS) - http://www.termius.com/
Step 01: Enable SSH
Option 01: Directly using raspi-config
- Connect monitor and keyboard to your Raspberry Pi
- Make sure your Raspberry Pi is powered on and wait for it to boot
- Enter
sudo raspi-config
in a terminal window - Select
Interfacing Options
and navigate toSSH
- Choose
Yes
,Ok
andFinish
Option 02: Using computer
- Connect Raspberry Pi SD card to your computer
- Navigate to the boot partition of the SD card (Boot partition is the smaller one)
- Create a blank file named
ssh
without any extension - When the Pi boots, it looks for the
ssh
file and if it is found, SSH is enabled and the file is deleted
Step 02: Connect to Raspberry Pi using SSH
- Connect your Raspberry Pi to your local network using an Ethernet cable or Wi-Fi
- Find out the IP address of your Raspberry Pi following this guide - https://community.blokas.io/t/find-raspberry-pis-ip-address/596
- Choose one of the following options based on the device you want to control your Pi with
Note: the default Rasbian username is pi
and the default password is raspberry
and for MODEP image the default username is modep
and the default password is blokaslabs
Option 01: Using Linux or macOS computer
- Connect your computer to the same Network as Raspberry Pi
- Open a terminal window and type
ssh USERNAME@IP_ADDRESS
(Change USERNAME with your username and for the IP_ADDRESS use the IP address from the previous step)
Option 02: Using Windows computer
- Download and install PuTTY software from https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html
- Connect your computer to the same Network as Raspberry Pi
- Launch PuTTY client
- Enter the IP address from the previous step and click
Open
Option 03: Using Android or iOS device
- Download Termius App from http://www.termius.com/
- Connect your device to the same Network as Raspberry Pi
- Open the Termius App
- Enter an alias of your choosing
- Enter the IP address from the previous step under hostname
- Complete the username and password fields and hit
Save
in the top right corner