In my hands, I have the Raspberry Pi that’s connected to the local wireless network through a Wi-Fi dongle. So, in this post, I will teach you how you can remotely connect or remotely SSH your Raspberry Pi using a Mac or Windows PC.
Once you power on the Raspberry Pi, you’ll be free to do away with the keyboard, mouse, and monitor – it’s now possible to control it remotely through SSH.
In this lesson. You’ll only need to connect the power supply and LAN cable to your Raspberry Pi. Power up your Raspberry Pi and ensure you see the green LEDs lighting before proceeding into the SSH process.
SSH into raspberry Pi: Step by step
Step 1: Enable SSH on the Raspbian OS
First, you should have already installed the Raspbian OS in your Raspberry Pi micro-SD card. You can purchase the Raspberry Pi micro-SD from the official project website. Starting with update for November of 2016, Raspbian came with its SSH server disabled. However, you can enable it through:
Manually through your PC
- Go to menu “Preferences” and start the Pi Configuration
- Go to Raspberry Pi “Interfaces”tab
- On the SSH option, choose “Enable”
- Finally, click “ok”
Other alternative: utilize raspi-config
- Enter the sudo raspi-config command in the terminal window
- Choose the “Interfacing” Options
- Go to SSH and select it
- Hit Yes
- Hit ok and then Finish
In the headless setup
In this case, you’ll need to drop the ssh, with no extension to your micro-SD’s boot partition. After booting, the Raspberry Pi will search for the ssh file, enable SSH and ultimately delete the ssh file. Note that the content of the ssh file could be anything from empty to having some text, which is not important at all.
Step 2: Connect with PC
Next, you’ll download the executable file for PuTTY (putty.exe). Notably, PuTTY is the free Windows SSH client.
- Therefore, you’ll need to start the PuTTY client.
- Next, key in the Raspberry IP under the “Host Name (alternatively the IP address)” but let the port number remain at 22. Finally, click “Open” button.
- Next, enter the Raspberry Pi username & password (if you’ve not changed the default are pi & raspberry)
- Continue performing any Linux command
However, it’s recommended that you assign some static IP to the Raspberry Pi. Therefore, you’ll not require to check the Raspberry IP as the router changes it regularly.
File Transfer between your Raspberry Pi and PC
If you need to transfer your files between the two devices, you can use the WinSCP tool. The WinSCP tool is an excellent secure FTP client that enhances secure transfer of such file.
Simply download the WinSCP tool the WinSCP website.
After downloading the WinSCP tool, install it. Finally, type the Pi username & password to log in.
For Mac connection
Open the Raspberry Pi Terminal and key;
- ssh firstname.lastname@example.org (use your new username if you’ve changed from the default)
Then type the Raspberry Pi password.
The SSH feature is a critical aspect of Raspberry Pi computing since it allows remote operation of the device. With the above elaborate process, you can now SSH (through DIY) into your Raspberry Pi.