- Raspberry Pi Computer Vision Programming
- Ashwin Pajankar
- 420字
- 2021-04-09 23:22:57
Remotely logging into the RPi with SSH
We can remotely access the Command Prompt of the RPi board using various software from Windows. We can run all the Linux commands that do not involve the GUI remotely from Windows. As you may recall, we discussed how to enable SSH with the Raspberry Pi Configuration tool in Chapter 1, Introduction to Computer Vision and Raspberry Pi. It enables remote login through SSH.
In order to get started, follow these steps:
First, we need to install any SSH software available for free. The most popular is PuTTY (https://www.putty.org/). I prefer to use another popular SSH client that comes with SFTP known as the Bitvise SSH client. You can download the installation file for Windows from https://www.bitvise.com/ssh-client-download and install it. After doing that, open the Bitvise SSH client. The following window will appear:
Enter a hostname, username, and password. The hostname is nothing but the IPv4 address of our RPi board, which we learned how to find in Chapter 1, Introduction to Computer Vision and Raspberry Pi.
After entering all the necessary information, click the Login button. This will start the RSA key exchange and display the following message box:
Click the Accept and Save button. This will save the exchanged RSA keys. Note that this message box won't be displayed if we try to connect to Raspberry Pi again with the same Windows computer. After that, two separate windows will appear. The first is the Command Prompt of the Raspberry Pi. Just like LXTerminal, we can run Linux commands from here too:
We can change the font and size of the text that appears here by changing the properties, which can be found by right-clicking the title bar. The following is the file transfer window:
On the left-hand pane, we have the Windows desktop and on the right-hand pane, we have /home/pi, the home directory of the pi user. We can transfer files between Windows and the RPi just by dragging and dropping them between these panes.
NOTE
We can access the Raspberry Pi Configuration Tool from the Command Prompt using the sudo raspi-config command. This is the command-line version of the tool.
This is how we can connect to the Command Prompt of the Raspbian OS remotely and transfer files. Next, we will learn how to remotely access the Raspbian OS desktop.