Raspberry Pi

Raspberry Pi SSH login by creating an SSH file in boot partition (Windows 10)

Raspberry Pi SSH login by creating an SSH file in boot partition (Windows 10)

One of the important aspects of using “Raspberry Pi” is that one can login to it remotely as well as locally without even connecting a screen/monitor to it. In today’s post we are going to learn about “Raspberry Pi SSH login“.

Before going further make sure you read the following articles first:

  1. Raspberry Pi headless set up for the first time (Flashing Raspbian OS)
  2. Giving an IP Address to Raspberry Pi using Ethernet Cable on Windows 10

Now that you have the above mentioned posts, you are goof to go with the flow.

Step 1: First of all, if you are on windows then you have to download the “SSH client“. In our case, we are using “MobaXterm“, go to this URL and download the free version as shown below.

Go to mobaxterm website
Go to “MobaXterm” website

Step 2: In our case, we are using the “Portable Version” of it.

Click on Portable edition
Click on Portable edition

Step 3: Now after the software has been download, “extract it” and “open it“. You will be seeing something as shown in the picture below. From this screen, select the “Session” tab.

Inside mobaxterm click on session to create a new session
Inside “MobaXterm” click on session to create a new session

Step 4: This is important, make sure you know “How to give IP Address to Raspberry Pi“, after that you can do as shown below, just replace “192.168.137.154” with the IP Address of your Pi.

Select SSH and enter IP Address of Pi and port number for SSH
Select “SSH” and enter “IP Address” of Pi and “Port Number for SSH”

Step 5: After we “hit enter“, we can see from the screenshot below, the SSH login is failed.

Question: Why is it happening?

Answer: In order to login into the Raspberry Pi we have to enable the SSH on it, by creating an “SSH” file in its “BOOT Partition“.

We are unable to log in into PI
We are unable to log in into PI

Note: Before going to the next step, remove the memory card from your Raspberry Pi and plug it into the laptop or computer you own.

Step 6: From the picture below, you can see that there is a “BOOT Partition” and this in particular is our matter of interest.

Remove memory card from Raspberry Pi and attach it to your machine and open BOOT partition
Remove the “Memory Card” from “Raspberry Pi” and attach it to your machine and open “BOOT partition”

Step 7: Open the “BOOT Partition” and type the “cmd” in the directory navigation in windows as shown below, and then “hit enter“.

To open this partition inside CMD on windows do as shown above
To open this partition inside “CMD” on windows do as shown above

Step 8: You will be dragged into a cmd window after that, you have to create that “SSH File” as shown.

Create an empty file named as SSH using CMD inside Raspberry Pi for SSH
Create an empty file named as SSH using “CMD” inside “Raspberry Pi” for SSH

Step 9: Now, after doing all of the steps, if we try to “refresh” in the “MobaXterm” again, from the photo below you can confirm that now we are prompted to save the password for SSH in the client machine.

Now again inside mobaxterm refresh and now it gives us a prompt
Now again inside “MobaXterm” refresh and now it gives us a prompt

Step 10: Look at the image below, and check it will be similar in your case as well, this shows the successful login into the Raspberry Pi.

Successfully logged into Raspberry Pi
Successfully logged into “Raspberry Pi”

Question: Are we able to access the internet from our Pi at this point of time?

Answer: No, because we are using the Ethernet method for giving the IP Address to our Pi from the windows 10 using a loop-back adaptor.

Step 11: The picture below shows that there is no internet connection available in our Raspberry Pi at this point of time.

Still the internet is not able to route into our Raspberry Pi
Still the internet is not able to route into our “Raspberry Pi”

Comment here