INTRODUCTION
FEATURES
TUTORIALS
Host a Webserver on your Raspberry Pi
Transferring Files with SFTP
ADVANCED
API
How to remotely transfer files to and from your Raspberry Pi over the internet
It is often necessary to transfer files to your Raspberry Pi when it is out at a remote site. You can do this with PiTunnel by making use of SSH and SFTP (Secure File Transfer Protocol).
In this article we will guide you through how to use PiTunnel to allow you to access SFTP for your Raspberry Pi from anywhere in the world. We will do this by using the Custom Tunnels feature of PiTunnel. All your Raspberry Pi needs is an internet conection and PiTunnel will do the rest.
What is PiTunnel?
PiTunnel is a service for remotely accessing your Raspberry Pi, and the projects that you build on it. A Device Monitor and Remote Terminal is included, and you can also create your own Custom Tunnels to access services running on your Raspberry Pi.
Setting up SSH
SFTP uses a service on your Raspberry Pi called SSH, that allows secure transfer of data. Therefore before you can use SFTP you need to enable SSH on your Raspberry Pi, and create a tunnel to access SSH through PiTunnel.com. Please follow our guide on SSH Sessions and then come back to this article to connect to your Raspberry Pi using SFTP.
Connecting with SFTP
Once you have SSH set up and working, you can connect to your Raspberry PI using SFTP to transfer files. You have a few choice of how to connect depending on what Operating System you are connecting from:
-
SFTP console client on Mac/Linux:
sftp -oPort=12345 pi@us1.pitunnel.com
Where 'pi' is your Raspberry Pi login username, and '12345' is the port number shown after the ':' in the 'Available At' column of the Custom Tunnels page. -
WinSCP on Windows:
File Protocol:SFTP
, Host name:us1.pitunnel.com
, Port number:12345
, User name:pi
, Password:******
Where 'pi' is your Raspberry Pi login username, '12345' is the port number shown after the ':' in the 'Available At' column of the Custom Tunnels page. -
FileZilla on Windows/Mac:
Host:us1.pitunnel.com
, Port:12345
, Protocol:SFTP
, User:pi
, Password:******
Where 'pi' is your Raspberry Pi login username, '12345' is the port number shown after the ':' in the 'Available At' column of the Custom Tunnels page.
us1.pitunnel.com
will depend on the region where you are located in the world, for example,
uk1.pitunnel.com
, eu1.pitunnel.com
etc.
Please use the exact domain as specified in the 'Available At' column of the Custom Tunnels page.
Next: Securing your Tunnels