To transfer files between your PC and Raspberry Pi we will be using Dataplicity Porthole as well as the WinSCP client.
On newer versions of Raspbian OS ssh is disabled by default. We'll be using it to transfer files so we'll want it enabled. Open up a terminal on your Raspberry Pi and execute the commands below.
sudo systemctl enable ssh sudo systemctl start ssh sudo systemctl enable regenerate_ssh_host_keys.service sudo systemctl start regenerate_ssh_host_keys.service
Your Raspberry Pi is now ready to transfer files.
When you launch porthole you will see a list of forwarded devices. We currently haven't added anything, so the list is empty.
To add a new device click on
Add new button in the centre or at the top menu.
In the next window you will see three steps.
- Assign local port - the port on your PC that you will access to see the data from your Raspberry Pi.
- Select device to be forwarded - choose the Raspberry Pi that you want to connect to from your PC.
- Add remote port - choose the port of your Raspberry Pi that your PC will access.
When all the steps have been completed click on
Assign. Your list of forwarded devices will then be updated.
Launch WinSCP and it will bring you straight to the login window. Fill it out with the following details:
- File protocol: SFTP.
- Host name: localhost.
- Port number: 10123.
- User name: pi. (Or a user name that you usually use on your Raspberry Pi.)
- Password: raspberry. (Or the password that you use for your user name.)
When that's done click on
Login button. WinSCP will now go through a process of logging you in. You will see the following warning on your first login:
Please note that the ssh key that you see in the warning window is a key of your Raspberry Pi device. This key does not reflect any Dataplicity servers, it is a direct connection to your Raspberry Pi.
The warning asks whether you trust connecting to the server. Click on
Yes. You will then be logged in to your Raspberry Pi.
On the left hand side you will see your PC files and on the right hand side you will see your Raspberry Pi files. Enjoy!
Updated 6 months ago