Raspberry Pi

How to Access Raspberry Pi Terminal Via Command Prompt

Raspberry Pi allows users to remotely access the Raspberry Pi terminal via SSH. If you are a windows user and want to remotely access Raspberry on your system without installing any new software/application specifically for this purpose, you can use Command Prompt to access the Raspberry Pi terminal through SSH. Command prompt is available in Windows OS.

Follow this guide to learn how to access the Raspberry Pi terminal via Command Prompt.

How to Access Raspberry Pi Terminal Via Command Prompt?

Accessing the Raspberry Pi terminal via the Command Prompt is a matter of a few steps only. The process is given below in which firstly we will enable SSH on Raspberry Pi after that the Raspberry Pi terminal can be accessed via Command Prompt by using the host IP of Raspberry Pi: Go through the below-given steps to successfully access the Raspberry Pi Terminal via Command Prompt:

Step 1: Firstly, enable the SSH service on Raspberry Pi. To enable SSH from the Raspberry Pi, select Preferences from the Application Menu and then open Raspberry Pi Configuration:

Step 2: From Raspberry Pi Configuration tool, click onto the Interface tab:

Step 3: Then enable SSH by turning the SSH button to right:

Step 4: Then click OK to save the setting:

Step 5: You will be required to know the IP address of your Raspberry Pi to access it remotely anytime, and if you do not know the IP, just run the below-mentioned command in Raspberry Pi terminal to find it:

$ hostname -I

The IP address will be displayed as an output of the above command:

Step 6: Now switch the system and get onto your windows PC and search for the Command Prompt and open it:

Step 7: Type the below-mentioned command along with host IP address in the Command Prompt:

$ ssh pi@<IP Address>

The IP address I have used is “192.168.18.2” and the username “pi”.

$ ssh pi@192.168.18.67

It will then ask for a password. Enter your Raspberry Pi system’s password to login to it:

Note: At first login attempt, it will for an approval to add the host to know host lists, enter yes there.

Step 8: After entering the password, it will successfully connect to your Raspberry Pi terminal.

Below I have run a ls command to verify that I have accessed the Raspberry Pi terminal successfully via Command Prompt:

$ ls -l

Note: To remotely access the Raspberry Pi terminal from Command prompt ensure that both the devices (Raspberry Pi and PC) are connected to the same network.

Optional: In case if you see the host verification error during the Raspberry Pi terminal access through Command Prompt, go to the “C>Users><username>.ssh” location and remove the known host file from there. After that you can successfully access the Raspberry Pi terminal through Command Prompt.

Conclusion

Command Prompt allows users to have remote access to the Raspberry Pi terminal on Windows PC or laptop. For this purpose, you must ensure enabling the SSH service on Raspberry Pi devices. After that, you can use the Host IP address of Raspberry Pi in Command Prompt using the “ssh @pi <IP address>” command to access the Raspberry Pi terminal on a PC or laptop.

About the author

Zahra Zamir

An Electronics graduate who loves to learn and share the knowledge, my passion for my field has helped me grasp complex electronics concepts and now I am here to share them with others.