This chapter describes how to transfer files securely between a PC and the Pico-G1 device with SCP (Secure Copy).
SCP (Secure Copy) is a secure file transfer method built on SSH. It copies files or directories between a PC and the Pico-G1 device. Its advantages:
As long as SSH is enabled on the device and the PC can reach it over the network, SCP can be used directly.
Before you start, confirm the following:
For example:
192.168.1.100root/root/If you do not know the device IP yet, see 04 System Login and 05 Network Configuration first.
Tip
If you prefer not to use the command line, you can drag and drop files in MobaXterm to upload and download.
On Windows 10 / 11, scp is normally available directly in PowerShell or Command Prompt. If the command is not found, make sure OpenSSH is installed on the PC.
scp -O local-file user@device-ip:remote-path
Example:
scp -O test.txt root@192.168.1.100:/root/
This uploads test.txt from the current local directory to /root/ on Pico-G1.
About the -O option
The OpenSSH scp shipped with Windows uses SFTP mode by default, but Pico-G1 does not support SFTP, so the transfer fails. The
-Ooption forces Windows to use the legacy SCP protocol.
scp -O user@device-ip:remote-file local-path
Example:
scp -O root@192.168.1.100:/root/test.txt ./
This downloads /root/test.txt from Pico-G1 to the current local directory.
Add -r to copy an entire directory:
scp -Or local-dir user@device-ip:remote-path
Example:
scp -Or data root@192.168.1.100:/root/
This uploads the local data folder and its contents to /root/ on the device.
Use -r when downloading a directory as well:
scp -Or root@192.168.1.100:/root/data ./
If a path contains spaces, wrap it in quotes:
scp -O "D:\my files\hello.txt" root@192.168.1.100:/root/
The first time you connect with SCP, a prompt like this may appear:
The authenticity of host '192.168.1.100' can't be established.
Are you sure you want to continue connecting (yes/no/[fingerprint])?
This is the normal SSH security prompt that confirms the identity of the target device.
If the IP address is correct, enter:
yes
The device fingerprint is then added to the local known-hosts list, and later connections normally do not prompt again.
After the transfer completes, verify it as follows.
Log in over SSH and run:
ls -l /root/
Or check whether the expected files exist in the target directory.
Check whether the downloaded files exist in the local target directory.