SCP File Copy

SCP (Secure Copy Protocol) is a secure file transfer tool based on SSH, used for transferring files and directories between a local host and a Quectel Pi L1 / M1 Debian system via encrypted connections. Before using SCP, ensure that the SSH service on the Quectel Pi L1 / M1 is started and that the computer and development board can communicate over the network.

This document was tested in the q@10.66.84.182 environment. Local upload, remote download, and recursive directory copy all work correctly. In actual use, use the development board’s current IP address.

Common Scenarios

All the following commands are executed in the local command-line terminal.

  • Transfer files from the local host to a remote host (local → remote):

scp /本地/文件.txt username@Quectel-Pi-IP:/目标路径/

Example:

scp ~/test.zip q@10.66.84.182:/home/q/  # 复制到远程主机的home目录
  • Transfer files between two remote hosts (remote → remote):

scp user1@host1:/path/to/file user2@host2:/path/to/dest/

Example:

scp alice@server1:/data/report.txt bob@server2:/backups/
  • Transfer files from a remote host to the local host (remote → local):

scp username@Quectel-Pi-IP:/远程/文件.txt /本地/路径/

Example:

scp q@10.66.84.182:/home/q/test.log ./downloads/  # 下载远程文件到本地

Recursive Directory Copy

Copy an entire folder (including sub-files and sub-directories):

scp -r /本地/目录/ username@Quectel-Pi-IP:/目标路径/

Example:

scp -r ~/my_project/ q@10.66.84.182:/home/q/