How to transfer files between Raspberry Pi PLC and your computer
This short tutorial will explain how to use Secure Copy Protocol (SCP) between a industrial Raspberry PLC and your PC
11 November, 2021by
Boot & Work Corp. S.L., Amil Shrivastava
The SCP protocol transfers files between two systems on the same network. The host system sends the file to the remote system with added security and authentications. The SCP client can request files or directories that are to be downloaded or upload files to the ssh server.
Both the systems should be connected to the same network, either wirelessly or via network cables.
Note: It is also possible to access files of a system on a public network, though this blog is not covering that.
SCP is already installed in most of the systems. Especially if they are Windows, Linux or MacOs.
In order to use the SCP protocol, we first need to know the IP address of the PLC
To check which IP of your PLC without accessing it you can run the following scan on your PC:
nmap -sn 192.168.1.0/24
This will give you a complete list of all the devices in your network with their IPs and MAC addresses.
Once you have the IP of the PLC, you can run the following command to send the desired file to the target client:
scp firstname.lastname@example.org: "Your file" "Location in the PLC where it needs to be saved"
scp [OPTIONS] [SOURCE] [DESTINATION]
This will request the password of the client. (Hence, the security feature)
and Voila, You have just sent a file to your industrial Raspberry Pi PLC using SCP protocol.