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
2. Enter **yes** and press **Enter** to confirm the upload and enter the login password to complete the upload. - If you use a system default password to log in to the instance, you can obtain the password at the [Message Center](https://console.intl.cloud.tencent.com/message). - If you forgot your password, please [reset the instance password](https://intl.cloud.tencent.com/document/product/213/16566).Note
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
22.214.171.124 to the same local directory:
scp email@example.com:/home/Inmp0.4.tar.gz /home/Inmp0.4.tar.gz