This topic describes how to transfer files from a local computer running Linux to an ECS instance by using the FTP service.
Prerequisites
The FTP service is set up on the ECS instance.
Software version
Operating system of the local computer: CentOS 8.3.
Procedure
Connect to the remote ECS instance.
- Execute the following command on the local computer to install FTP.
- Execute the following command to connect to the ECS instance, and enter the username and password of the FTP service as prompted.
- ftp EIP of the ECS instance
- If the following output is displayed, the connection is successful.
-
Upload a file
Execute the following command to upload a file from your local computer to the ECS instance.
put local-file [remote-file]
For example, you can execute the following command to upload the local upload.txt file to the ECS instance.
put /home/upload.txt upload.txt
If the following output is displayed, the file is uploaded.
Download a file
Execute the following command to download a file from the ECS instance to the local computer.
get [remote-file] [local-file]
For example, you can execute the following command to download the download.txt file from the ECS instance to the local computer.
get download.txt /home/download.txt
If the following output is displayed, the file is downloaded.