Thursday, February 20, 2020

How to connect to a Raspberry Pi Remotely via SSH

How to connect to a Raspberry Pi Remotely via SSH

The preferred (and most common) method of connecting to your Pi to run commands is what w going to be dealing with. Can you connect your Raspberry Pi remotely via SSH from your laptop or desktop computer? This guide will cover that.connect to a Raspberry Pi Remotely via SSH

Steps on How to connect SSH into Raspberry Pi

SSH (Secure Shell) is considered as one of the best methods of connecting to your Raspberry Pi.   However, I recommend that anyone that wants to connect to Raspberry Pi use the method of SSH that we about to talk about in the below article.

At first, open a command line, enable SSH, Get the username and password, and finally use the SSH command. These are just the four basic ways of connecting SSH into Raspberry Pi.

  Let’s talk it out in detail!

Step 1: Open a Command Line

Now you need to connect your Pi to your Wi-Fi or wired network and afterward, open a new command line. How do you do this? I will show you how to open a command line on Mac and Windows 10+.

For Mac:

Open up the terminal by navigating to applications > Utilities > Terminal.

For Windows 10+:

The step is to right-click on the Start button to open Command Prompt and then click on Command Prompt.

Note: For Windows, before you will be able to complete this task, you will need to install Putty and follow these instructions before you move over to the next step.

Step 2: Enable SSH

The point of enabling SSH is because Raspbian Jessie, Raspbian Stretch, and Raspbian Buster have SSH disabled by default for security reasons. Assuming you are using an up-to-date version of Raspbian then you will need to enable the SSH on your Raspberry Pi before proceeding.

Step 3: Get the username and password

Do you know the default username and password for your Raspberry Pi? Then you should check out for the below.

The default username and password for Raspberry Pi is

Username: Pi

Password: Raspberry.

But if you had once reset your password and name then you should use the newly updated password and name.

Step 4: use the SSH Command

Note that your default hostname for the Pi is raspberry pi, so while you are engaging the command in your command line app, you enter the following and press enter: ssh Pi@raspberrypi.

Note: some distributions just like RetroPie change the hostname by default. For instance, the default hostname for RetroPie is retropie.  So should try connecting using that in place of raspberry pi.

Quickly check if your own Pi uses a certain hostname by trying each hostname: Ping raspberry pi. Or rather, you can also connect using your Raspberry Pi’s IP address. The IP address is ssh Pi@192.168.x.x. The link is your PI’s IP address. Then enter the password when you see the prompt Password. Ensure you tap the right keys because it won’t show for security reasons.

By the time you must have done this, you might encounter a host verification warning that ends with something like the authenticity of host ‘abc (abc)’ can’t be established. RSA key fingerprint is 3f:1b:f4:bd:c5:aa:c1:1f:bf:4e:2e:cf:53:fa. As you sure you want to continue connecting (Yes/No)?

What is security measure is trying to explain is that you are trying to connect to a host for the very first time? All you have to do is to type yes and send. So after you must have connected, then the host will be added to the known _hosts file and thereabout, you will never see such warning again.



from WordPress https://ift.tt/2vNh9GN

No comments:

Post a Comment