Table of Contents
The article explains How to Use SSH Raspberry Pi on Windows. The Raspberry Pi learning curve includes learning how to control it remotely from another computer. While not the only protocol available, SSH is what we typically use to do this. Physically, the Raspberry Pi 4 Model B is very identical to the Pi 3 Model B+ from a year ago, but the hardware has undergone several changes. To control the Raspberry Pi through Windows via SSH, follow the steps below.
The most powerful Pi to date is the Raspberry Pi 4. The first for any Raspberry Pi, it includes cutting-edge technology features including USB-C power input, two video outputs that can drive an external 4K monitor, and a variety of RAM add-ons. There’s a lot of heat generated by all that potential on a board that’s roughly the same size as previous Pi models, which can cause shutdowns.
How to Using SSH Raspberry Pi on Windows
Step 1: Enable SSH in Raspbian
For security reasons, Secure Shell is not enabled by default in Raspbian. On your Raspberry Pi, choose Menu > Preferences > Raspberry Pi Setup. Click on Interfaces and set SSH to On. Click OK. You don’t need to restart your Raspberry Pi, and SSH will be enabled whenever you use this Raspbian installation from that point on (make sure you’ve updated your password from the default, which is ‘raspberry’). need to define up SSH into a headless Raspberry Pi? Check the official documents.
Step 2: Enable SSH Client on Windows
Linux and macOS support SSH out of the box; skip to Step 3 if using one of these operating systems. Windows 10 supports SSH, but you need to enable it. Click Search and search for ‘Manage Optional Features’. Click it under Search to open the Settings window. Click on ‘Add a feature’ and wait for the list of Optional Features to load. Scroll down to Open SSH Client (Beta). Click Install.
Step 3: Get your IP address
Connect your Raspberry Pi to a local network. Use wireless LAN or connect the Raspberry Pi directly to a router with an Ethernet cable. Open a Terminal window and type the following command:
host name
You should see:
Raspberry Pi
In some circumstances, you can use this hostname, which is useful if you don’t have the IP address, but it’s more reliable to use the IP (Internet Protocol) address. Type this to get your IP address:
hostname -I
This will return four numbers separated by dots. For example, ours is:
192.168.0.41
Write down this number. You will need it soon.
Step 4: Connect via SSH
Open the command prompt on a Windows PC or a Terminal window on Linux or macOS. Type this command:
ssh pi@[IP]
To replace [IP] with the Raspberry Pi IP address. In our case, we enter
ssh pi@192.168.0.41
The first time you do this, you’ll get a message saying authenticity cannot be established, followed by a long cryptographic hash of letters and numbers. It will say, ‘Are you sure you want to continue connecting?’ Type yes and press RETURN. You will be prompted to enter your Raspberry Pi password.
Step 5: Use PuTTY on a Windows PC
On older PCs, you will need to install PuTTY. Download the putty.exe file and click Run. The PuTTY Configuration window appears with basic options. Enter your Raspberry Pi’s IP address in the ‘Hostname (or IP address)’ field. Do not change the ‘Port’ field. Click Open. You will get a PuTTY ‘Security Alert’ field. Click Yes. Terminal window displays ‘login as:’ Enter pi and press RETURNS. Now enter your Raspberry Pi password.
Step 6: On the Raspberry Pi
Now you will see your usual command line replaced by pi@raspberrypi: ~$. You are now logged in and working on your Raspberry Pi’s command line. Enter ls and you’ll see Desktop, Downloads, Documents, and other Raspberry Pi-only folders and files. You can create, edit, move and work with files as if you were using a terminal on your Raspberry Pi.
Step 7: Visual interfaces
There are limitations for SSH. A simple SSH connection cannot open programs that use a graphical interface, so you must learn to use command-line alternatives (like nano or vim instead of Leafpad for text editing). On Linux computers, you can forward your X session over SSH, to allow the use of graphical applications, using the -Y flag:
ssh -Y pi@[IP]
You are now on the command line as before, but you have the ability to open up graphics windows. For example, typing:
scratch, scratch &
Step 8: Copy the files
It is not easy to share files using Secure Shell from the command line, but it is possible and a useful skill to learn. If you are still accessing the Raspberry Pi, type exit at the command line to return to your local shell:
With SSH enabled, you can copy files from the source computer to the Raspberry Pi using SCP. We download the MagPi issue #83 PDF file to our Downloads folder. Let’s copy it to the MagPi directory on our Raspberry Pi. Use the scp command followed by the path to the source file and then the destination location. the destination is pi@[IP] followed by a colon ‘:’ and the path to the destination location.
scp [source] pi@[IP]:[destination]
Replace the [source] and [destination] parts with the paths to the desired destination file and folder and add the IP address of your Raspberry Pi. For example, copying the PDF file on our machine looks like this:
scp DownloadsMagPi83.pdf pi@192.168.0.41:/home/pi/MagPi
This copies the MagPi issue #83 PDF from the Downloads folder on our Windows PC to the MagPi directory on the Raspberry Pi.
Step 9: copying files
If you copy a lot of files from a computer to the Raspberry Pi, it’s a good idea to set up SFTP using a dedicated FTP program such as FileZilla. Install FileZilla on your computer (it is available for Linux, Windows and macOS). Open FileZilla and choose File > Site Manager. Now click on New Site and you can give the site a custom name like ‘Raspberry Pi’. Change the protocol to ‘SFTP – SSH File Transfer Protocol’. Enter ‘raspberrypi’ in the Host field, ‘pi’ in the User field and your Raspberry Pi password in the Password field.
Click Connect and you will remotely connect to the Raspberry Pi. You will see all your Raspberry Pi files on the ‘Remote’ right side of the screen. On the left, in the ‘Local Site’ section will be all the files on your computer. Double click the directory folders on either side to navigate to them and use the ‘..’ folders at the top of each list to navigate back up to the parent folder. Double-click a file on the Local Site to send it to the Remote section and vice versa. Follow FileZilla tutorial if you need more guidance.
Conclusion
Here they are final from our article How to Use SSH Raspberry Pi on Windows. A micro-HDMI to HDMI cable was used to connect the Raspberry Pi to a 4K monitor. The Broadcom BCM2711 ARM-based system on a chip (SoC) that powers the Raspberry Pi 4 has more powerful Cortex-A72 processing cores. The Raspberry Pi. The Pi 4 produces a lot of heat due to its increased capacity, which can cause it to shut down, especially if you’re using it to stream video or perform other similarly demanding tasks. The article is finished and you know now How to Use SSH Raspberry Pi on Windows.