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.

41 comments:

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

    ReplyDelete
  2. With Pi 3 you might need to enable ssh
    https://www.raspberrypi.org/documentation/remote-access/ssh/

    ReplyDelete
  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

    ReplyDelete
  4. 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

    ReplyDelete
  5. Keep it up for more updates, thank you so much for sharing this valuable information. Visit Protrek Adventure for Best Everest Base Camp with Gokyo Ri and Everest Base Camp Three Passes Trek at affordable prices.
    Everest Base Camp Three Passes Trek

    ReplyDelete
  6. Amazing blog. Create N Gift provides one of the top Birthday Gifts for Men and Gifts for Girlfriend in India at an affordable price.
    Gifts for Girlfriend in India

    ReplyDelete
  7. As one of Chinese famous valve supplier, TFW's products are exported to over 50 countries. Has standardinzed production ISO certificate, as weel as CE, TUV, and other certificate. long warranty. short delivery. top valve manufacture. More: butterfly valve

    ReplyDelete
  8. Awesome blog. RP Paper Impex is a leading Business Diary Manufacturer and Writing Paper Manufacturers in India.
    Writing Paper Manufacturers in India

    ReplyDelete
  9. Lots of useful info. Like your writing and explaining thing. Really a helpful and informative report


    Ghalib ki shayari Urdu

    ReplyDelete
  10. This is Very very nice article. Everyone should read. Thanks for sharing. Don't miss WORLD'S BEST 👉 BikeRaceGame

    ReplyDelete
  11. We Give out personal loans for debt consolidation, bad credit loans, unsecured loans, loans for bad credit and instant secured loans with cheap rates Do you have a firm or company that need loan to startup a business or need, personal loan, Debt consolidation? For more information. We will provide you with loan to meet your needs. For more information contact Note: And many More:and many more at 2%interest rate; (Whats App) number: +919394133968 patialalegitimate515@gmail.com Mr Jeffery

    ReplyDelete
  12. you have a great blog here! would you like to make some invite posts on my blog? 토토

    ReplyDelete
  13. Good post. I study one thing more difficult on totally different blogs everyday. It can all the time be stimulating to learn content from different writers and follow a bit one thing from their store.
    온라인경마
    경마사이트

    ReplyDelete
  14. Hello there! Nice article!!! But anyways here’s one of the trusted online baccarat site we can offer you so many promo and event everyday!! Good luck!!! Feel free to visit my website; 토토사이트

    ReplyDelete
  15. Trevor Appleton: Remotely Copy Files To And From Your Raspberry Pi. >>>>> Download Now

    >>>>> Download Full

    Trevor Appleton: Remotely Copy Files To And From Your Raspberry Pi. >>>>> Download LINK

    >>>>> Download Now

    Trevor Appleton: Remotely Copy Files To And From Your Raspberry Pi. >>>>> Download Full

    >>>>> Download LINK

    ReplyDelete
  16. laser, double-sided, color, or high-speed. In addition to printers, most rental agencies carry scanners and fax machines, in case they are needed too. renting impresoras alicante

    ReplyDelete
  17. This comment has been removed by the author.

    ReplyDelete
  18. This blog is really helpful for the public .easily understand,
    Thanks for published,hoping to see more high quality article like this.
    슬롯사이트

    ReplyDelete
  19. Amazing blog. Find Importers and exporters from Vietnam Import Export Trade Data by Vietnameximp. For more information about vietnam import export data visit our website.
    Vietnam Import Export Trade Data

    ReplyDelete
  20. Thanks for sharing such an amazing information with us. Get Philippines Import Export Trade Data by Philippineseximp. Visit our website for more information about philippines import export.
    Philippines Import Data

    ReplyDelete