Remotely Control Raspberry Pi Via Ssh

About the project

Learn how to SSH into your Raspberry Pi from your local computer to control your Pi from a distance.

Project info

Difficulty: Easy

Platforms: Raspberry Pi

Estimated time: 1 hour

License: GNU Lesser General Public License version 3 or later (LGPL3+)

Items used in this project

Hardware components

Raspberry Pi 4 Model B Raspberry Pi 4 Model B x 1

Story

In this tutorial, you will be learning how to SSH into your Raspberry Pi from your local computer. SSH (Secure Shell), is a popular network protocol you can utilize to access a command line interface remotely on another computer via a network, thereby granting you access to control that computer and interact with it without having to plug it into a monitor or a keyboard, which can be incredibly useful for the Raspberry Pi at times where you do not feel like using peripherals. Thankfully it is very easy to set up and we will be doing this setup on a Raspberry Pi and a Mac.

Before reading the remainder, be sure to subscribe and support the channel if you have not!

Subscribe:

Youtube

Support:

https://www.buymeacoffee.com/mmshilleh

Remember you can purchase Raspberry Pi accessories at ShillehTek!

https://shillehtek.com/collections/all

Step 1-) Make sure your Pi and Computer are Connected

Your Raspberry Pi and Computer should be connected to the same local network or connected via ethernet. I am using wireless in this example just because I do not have an ethernet.

Step 2-) Enable SSH on Pi

Once you are logged in go to your Raspberry Pi Configuration as follows:

You can enable SSH by selecting the toggle item, and then clicking okay. Ignore the I2C one, you do not need that. Click OK and restart your Raspberry Pi; you can do this by opening the command line and typing 'sudo reboot'.

Step 3-) Get the SSH information you need.

You will need the IP address, username, and password of your system to SSH from your local computer.

First to get the IP address we open the command line on our Raspberry Pi and type the command 'ifconfig', which shows us the following.

You want to copy the IP Address by the inet value in the wlan0 section, mine is masked here for security purposes.

Next type the command 'whoami' in the command line as follows:

You will need this username later on. Of course, you will also need the password you use to login to the Pi itself.

Step 4-) Local Computer

On your Mac, you can open a Terminal window and now type the following command similar to mine.

ssh followed by your username@IP-Address

Type enter and it will prompt you for your password, and then ask if you want to enable RSA fingerprint, type yes.

Once that is done you should have access to your Raspberry Pi system remotely! It is very quick and secure to set this up and can be incredibly useful. Hope you got it to work.

Conclusion

Do not forget to subscribe and follow our blog on ShillehTek for the latest updates. Hope you enjoyed the tutorial let me know if you have any questions, please!

Credits

Photo of mahmood-m-shilleh

mahmood-m-shilleh

Mechanical and Software Engineering Background. University at Buffalo 2019 Texas A&M 2021 I make data pipelines for my day job. Outside of work, I participate in online communities regarding Full Stack Engineering, Microelectronics, and more. You can find more details about me on my Youtube Channel. https://www.youtube.com/@mmshilleh Feel free to reach out!

   

Leave your feedback...