Tuesday, 11 March 2014

Remotely copy files to and from your Raspberry Pi.

Most of the time I remotely log into my Raspberry Pi. Depending on what I am doing I will either SSH into it or VNC into it, which allows me to do almost whatever I would like to.

I say almost as there is a caveat.

What happens when I want to transfer a file to or from the Raspberry Pi?

I have to find a memory stick, plug it into my computer, copy the files onto it, unplug it, plug it into my Raspberry Pi, go back to my computer, copy the files over...

Then if I happen to modify a file and want to transfer it back I go through the whole process again.

What an absolute pain!

There must be a better way... Well you will be pleased to know there is!

The secret is using SSH File Transfer Protocol or SFTP. (SSH stands for Secure Shell.)

Once you know how to use this, and it really is simple, it opens up a whole world of really cool options.

Lets start simple, and work out how to transfer files to and from your Raspberry Pi.

There are a number of programs you can download to help you out with this, but if you are new to this, I recommend FileZilla.

You will want the client and not the server version. You can download it from this link.

There is a version for Windows, Linux and Mac OSX.

Once installed, load the program. You should see a screen like this.

Now click on File and then Site Manager.

Now you should click on New Site and make the following changes:
  • In the entry box next to Host type in the IP address of your Raspberry Pi. If you are unsure of this, you can follow an earlier blog post of mine which helps you to determine this. 
  • Protocol should be changed to SFTP - SSH File Transfer Prototcol.
  • Logon Type should be Normal
  • Type in your User name in the box below this
  • Your login Password goes into the box below. 
  • Using the Rename button I have renamed my connection to Raspberry Pi. You dont have to do this, but it helps you identify your connection.
Your screen should look something like this.

You can now click on connect.

You may get a message warning you that the server's host key is unknown. You can just click OK if this box appears.

Your FileZilla window will now look as follows.

On the left hand side you can see under the Local Site there is a window which shows you the folder structure of your system. Underneath that there is a window which shows information of the files and folders of any folder you chose in the folder structure.

This is repeated on the right hand side but for the file / folder structure on the Raspberry Pi.

To transfer files to you Raspberry Pi

  • Navigate to the folder you would like to place the files into using the right hand windows. 
  • Navigate to the files or folders you would like to copy over in the left hand windows. 
  • Right click on the files or folders and chose "Upload"
The file will start to copy over to the selected folder. 

A similar process is used to transfer files from your Raspberry Pi.

  • Navigate to the folder you would like to place the files into using the left hand windows. 
  • Navigate to the files or folders you would like to copy over in the right hand windows. 
  • Right click on the files or folders and chose "Download"

This will copy files from your Raspberry Pi.

In the future your information should be saved into FileZilla, so you can just click on File then Site Manager, select the Raspberry Pi connection you have set up and then click connect. Simple!

I am sure a lot of you will find the use of SFTP very simple but effective, and you will no longer be searching around for a memory stick to copy files to your Raspberry Pi.


  1. Nice instructions that work. Thank you...I know it is some work to create these for those of us who need help.

  2. With Pi 3 you might need to enable ssh

  3. Very informative post! There is a lot of information here that can help any business get started with a successful social networking campaign. canon copier

  4. Great Article. Thank you for sharing! Really an awesome post for every one.

    IEEE Final Year projects Project Centers in Chennai are consistently sought after. Final Year Students Projects take a shot at them to improve their aptitudes, while specialists like the enjoyment in interfering with innovation. For experts, it's an alternate ball game through and through. Smaller than expected IEEE Final Year project centers ground for all fragments of CSE & IT engineers hoping to assemble. Final Year Project Domains for IT It gives you tips and rules that is progressively critical to consider while choosing any final year project point.

    Spring Framework has already made serious inroads as an integrated technology stack for building user-facing applications. Spring Framework Corporate TRaining the authors explore the idea of using Java in Big Data platforms.
    Specifically, Spring Framework provides various tasks are geared around preparing data for further analysis and visualization. Spring Training in Chennai

  5. I like this blog, really so much. Visit OGEN Infosystem for best Website Designing services in Delhi, India at a reasonable price.
    Top 5 Website Designing Company in India