Setting Up an SSH connection in Raspberry Pi

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

Step 1: Fetching IP Address

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

Step 2: Enable SSH in Raspberry Pi

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

1. Enabling SSH via GUI
  1. Open Raspberry Pi configuration menu.
  2. In 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 and then select OK.
  4. Now click finish and exit
3. Enabling SSH for headless display

By placing Raspbian image on blank SD card, you will have two partitions. In smaller partition, place 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 3rd party SSH client. In SSH client you will have to provide IP address and port number of your Raspberry Pi. Then, you will be provided with a security alert which you have to accept in order to access Raspberry Pi. Now, provide your login credentials of Raspberry Pi to log in and you are good to go.

For basic hardware information about Raspberry PI 3, Click here

Leave a Reply