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
- Connect Raspberry Pi to router using WiFi.
- Alternatively, you can directly connect to router using Ethernet Cable.
- In terminal type
Step 2: Enable SSH in Raspberry Pi
There are three ways to enable SSH connection in Raspberry Pi.
1. Enabling SSH via GUI
- Open Raspberry Pi configuration menu.
- In interfaces tab, Enable SSH.
- Now, click ok and exit.
2. Enabling SSH via terminal
- Open terminal and type
sudo raspi -config
- Select interfacing options, then go to SSH.
- Now, choose YES and and then select OK.
- 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