Home RASPBERRY PI How to SSH to the Raspberry Pi

How to SSH to the Raspberry Pi

0

How to SSH to the Raspberry Pi

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

  1. Go to menu “Preferences” and start the Pi Configuration
  2. Go to Raspberry Pi “Interfaces”tab
  3. On the SSH option, choose “Enable”
  4. Finally, click “ok”

Other alternative: utilize raspi-config

  1. Enter the sudo raspi-config command in the terminal window
  2. Choose the “Interfacing” Options
  3. Go to SSH and select it
  4. Hit Yes
  5. 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.

  1. Therefore, you’ll need to start the PuTTY client.
  2. 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.
  3. Next, enter the Raspberry Pi username & password (if you’ve not changed the default are pi & raspberry)
  4. 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;

  1. ssh [email protected] (use your new username if you’ve changed from the default)

Then type the Raspberry Pi password.

Conclusion

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.

Author Credits: This is a guest blog post was written by Isaac Munyiri,The brains behind safetomatic.com . He is Raspberry Pi Enthusiastic, Java developer. Engineer.

Advertisements

LEAVE A REPLY

Please enter your comment!
Please enter your name here