Setting Up an SSH connection in Raspberry Pi

Learn setting up SSH connection in Raspberry Pi. The command line of Raspberry Pi is accessed using SSH connection. SSH will remotely connect Raspberry Pi to any computer which will be the client. Using SSH you can only access the command line, GUI is not available using SSH. So, let’s start.

Step 1: Fetching IP Address

  1. Connect Raspberry Pi to the router using WiFi.
  2. Alternatively, you can directly connect to the router using Ethernet Cable.
  3. In terminal type ifconfig

Step 2: Enable SSH on Raspberry Pi

There are three ways to enable SSH connection in Raspberry Pi.

1. Enabling SSH via GUI
  1. Open the Raspberry Pi configuration menu.
  2. In the interfaces tab, Enable SSH.
  3. Now, click ok and exit.

2. Enabling SSH via terminal
  1. Open terminal and type sudo raspi -config
  2. Select interfacing options, then go to SSH.
  3. Now, choose YES and then select OK.
  4. Now click finish and exit
3. Enabling SSH for headless display

By placing the Raspbian image on a blank SD card, you will have two partitions. In a smaller partition, place a file named SSH. When Raspberry Pi boots up, it will look for SSH file and if it is found then SSH will be enabled.

Step 3: Set up client

In macOS and Linux, SSH client is already present. For Windows, you will have to install a 3rd party SSH client. In SSH client you will have to provide the IP address and port number of your Raspberry Pi. Then, you will be provided with a security alert that you have to accept to access Raspberry Pi. Now, provide your login credentials of Raspberry Pi to log in and you are good to go.

Learn basic hardware information about Raspberry Pi 3

Leave a Reply