Using WinSCP to connect to a Raspberry Pi

Published: by
Last updated:
Categories
Raspberry Pi

WinSCP is a free SFTP, SCP and FTP client for Windows. Apart from other functions, WinSCP is used to view and copy files and folders on a remote Raspberry Pi.

Introduction

WinSCP is a network utility that can use SCP (secure copy protocol) to log into a Raspberry Pi operating system using its username and password. Raspbian, OpenELEC and RetroPi are among the operating systems that can be connected to.

As a client, WinSCP has two file panels — one for the local interface and one for the remote interface. Each file panel looks similar to Windows Explorer in that it presents files and directories in a folder-like fashion.

The file panels allow for drag-and-drop functionality between the interfaces and simplify creating, copying, renaming and moving of files and directories. User permissions can also be set using WinSCP.

WinSCP
WinSCP terminal window from Windows 10 showing the local (left) and remote file panels.

Why use WinSCP to connect to a Raspberry Pi?

Raspberry Pis are popular to use as small, standalone devices on a network. By using WinSCP, the need for these devices to have a keyboard, mouse and screen is reduced to only their setup phases. After an IP address has been obtained, WinSCP can be used from a remote computer to have file access.

WinSCP and PuTTY

Both WinSCP and PuTTY can be installed in Windows. WinSCP used together with PuTTY will extend remote access to a windowed, terminal-like CLI.

Requirements for using WinSCP

  • The Raspberry Pi and the remote computer are connected to the same local network.
  • The Raspberry Pi has SSH enabled. Some Raspbian distributions have SSH enabled by default but can be configured using the Raspi-config tool.
  • The IP address of the Raspberry Pi is known. It can be obtained by using the following terminal command:
hostname -I

Download & configure WinSCP

WinSCP can be downloaded from the official WinSCP website. The installation on a Windows operating system is straightforward. After downloading and running the installation file, the default settings can be used.

The first time WinSCP is opened there will be a blank Login area (left). After clicking on New Site, supply all the details of the Raspberry Pi in the Session area.

The IP address of the Raspberry Pi is saved under Host name, the File protocol should be set to SCP and the Port number should be left as 22. After selecting Save, WinSCP will prompt for a Site name and the option to save the password.

Using WinSCP to connect to a Raspberry Pi
Adding a new site (or remote device) to WinSCP.

By double-clicking on the Site name on the Login area, the WinSCP terminal will open. During the first connection, PuTTY will obtain the host key from the Raspberry Pi, which will probably cause the following security alert to pop up.

WinSCP security alert
An example of a security alert when connecting for the first time to a Raspberry Pi.

Click Update to continue with the connection.

For Raspbian, the default username and password is pi and raspberry. Multiple saved Logins to different devices can be created.

The settings can be changed by selecting the applicable saved Login and Edit. After changing the settings it needs to be saved again.

Optional settings

The default WinSCP settings will work for most users, but over time some additional settings might become handy. The WinSCP settings are situated under Preferences (situated in the Options on the menu bar, by clicking the grey gear icon, or by pressing Ctrl + Alt + p).

To show hidden files in WinSCP, this preference can be activated under the Panels section or by pressing Ctrl + Alt + h.

Opening multiple instances of WinSCP is also possible. While WinSCP is already running with another session, hold down the Shift key while opening WinSCP again (i.e. by clicking on the shortcut icon).

Using WinSCP to connect to OpenELEC & XBMC (Kodi)

WinSCP can be used to gain access to screenshots, fan art, banners, posters or any other media-related files from Kodi.

Installing Kodi on a Raspberry Pi
WinSCP can be used to connect to OpenELEC and XBMC.

For SCP, SSH needs to be enabled. Kodi might not have SSH enabled. SSH can be enabled from the Services section by going to Settings -> OpenELEC -> Settings (do not change the username and password settings for now). A reboot might be required. SFTP can also be used to connect to WinSCP to Kodi.

Kodi Services Settings
Enabling SSH in the Kodi Services Settings section.

The default username and password for OpenELEC is root and openelec and root without a password for XBMC.

Using WinSCP to connect to RetroPie

WinSCP can be used to connect to RetroPie to get access to screenshots and probably many other relevant directories.

Introducing RetroPie - the Raspberry Pi classic video game emulator
WinSCP can be used to connect to RetroPie.

To use WinSCP to connect to RetroPie, SSH needs to be enabled from the RetroPie Configuration screen by choosing RASPI-CONFIG-> 5 Interfacing Options -> P2 SSH (tested on RetroPie 4.2).

The default username and password for RetroPie is pi and raspberry.

Using WinSCP to connect to a Raspberry Pi WordPress server

It might be necessary for WordPress theme and plugin developers to gain access to the Raspberry Pi server’s web directory (/var/www/html).

Installing WordPress on a Raspberry Pi
WinSCP can be used to connect to a Raspberry Pi WordPress web server.

If the server was configured correctly WinSCP can use the username and password set for the Raspberry Pi. For Raspbian, the default username is pi and password is raspberry.

Raspberry Pi accessories

To get started with the Raspberry Pi connected to a local network, you might need some of the following accessories.

Please support us by using these links - they come at no additional cost to you, but we get a little commission each time they are used. These and others are available from Amazon.com and BangGood.

We have tested most of these products ourselves. Other selection criteria include affordability, quality, availability and average user rating and popularity by other buyers.

Links will open in a new window.
(Dead or old links can be reported in the comments section below.)

Featured products

CanaKit Raspberry Pi 4B 4GB Starter Kit
CanaKit Raspberry Pi 4B 4GB Starter Kit
2019 Model B, 4GB RAM
1.5GHz 64-bit quad-core CPU & 4GB RAM, Gigabit Ethernet, Wi-Fi, Bluetooth, USB 2.0/3.0, headphone jack and duel Micro HDMI (4K). Kit includes power supply, MicroSD, USB MicroSD card reader, a case with heatsink and fan, mini-HDMI cable and USB-C PiSwitch.
Available from Amazon.com
CanaKit Raspberry Pi 4B 8GB Starter Kit
CanaKit Raspberry Pi 4B 8GB Starter Kit
2019 Model B, 8GB RAM
1.5GHz 64-bit quad-core CPU & 8GB RAM, Gigabit Ethernet, Wi-Fi, Bluetooth, USB 2.0/3.0, headphone jack and duel Micro HDMI (4K). Kit includes power supply, MicroSD, USB MicroSD card reader, a case with heatsink and fan, mini-HDMI cable and USB-C PiSwitch.
Available from Amazon.com
Catda Raspberry Pi 4B Starter Kit
Catda Raspberry Pi 4B Starter Kit
2019 Model B, 4GB RAM
1.5GHz 64-bit quad-core CPU & 4GB RAM, Gigabit Ethernet, Wi-Fi, Bluetooth, USB 2.0/3.0, headphone jack and duel Micro HDMI (4K). Kit includes power supply, MicroSD, USB MicroSD card reader, a case with heatsink and fan, mini-HDMI cable and USB-C PiSwitch.
Available from BangGood

Related products

Conclusion

WinSCP is an excellent tool for managing file transfers between a remote computer and a Raspberry Pi operating system — securely. The ability to save and add multiple profiles make managing file transfers on even a large number of Raspberry Pis easy and efficient.

With its familiar windows-like file explorer interface, files can be dragged and dropped from one device to another. WinSCP is popularly used to connect to Raspbian, Kodi and RetroPie.

About the author
Renier busies himself with improving his English writing, creative web design and his websites, photoshopping, micro-electronics, multiple genres of music, superhero movies and badass series.
Behind the Scenes is a free, informative website. If you find value in any of our content, please consider making a donation to our cause.
Donate via PayPal

Save, share & discuss

Your comment is important, but don't be a knob. Keep it constructive and polite.

Leave a Reply

Your email address will not be published. Required fields are marked *

More Raspberry Pi related posts