The document uses CVMs with CentOS 8.2 as an example to describe how to upload and download files via SCP.
You have purchased a Linux CVM.
Log in to the CVM console, navigate to the Instances page, and record the public IP of the CVM to which you want to upload files, as shown below:
scp local file address CVM account@CVM instance public IP/domain name: CVM file location
For example, you can run the following command to upload the local file
/home/lnmp0.4.tar.gz to the same directory of the CVM whose public IP is
scp /home/Inmp0.4.tar.gz firstname.lastname@example.org:/home/Inmp0.4.tar.gz
You can add the
-rparameter to upload folders. For more information on the
scp CVM account@CVM instance public IP/domain name: CVM file location local file address
For example, you can run the following command to download the file
/home/lnmp0.4.tar.gz from the CVM whose public IP is
18.104.22.168 to the same local directory:
scp email@example.com:/home/Inmp0.4.tar.gz /home/Inmp0.4.tar.gz