Remotely Control Raspberry Pi Via SSH

by mahmoodmustafashilleh in Circuits > Raspberry Pi

549 Views, 3 Favorites, 0 Comments

Remotely Control Raspberry Pi Via SSH

Copy of Untitled Design (1).png
Remotely Control your Raspberry Pi via SSH: Beginner's Guide

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

Supplies

Raspberry Pi 4B

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.

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'.

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.

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!