If your on-premises machine runs Windows, you can use WinSCP to connect to a Linux Elastic Compute Service (ECS) instance and upload or download files.
Scenarios
On-premises machine: Windows
ECS instance: Linux
File size: unlimited
If your on-premises machine runs a Linux or macOS operating system, see Use SFTP or SCP to upload files from or download files to an on-premises computer that runs a Linux or macOS operating system or Run SCP commands to transfer files to or from a Linux instance.
You can also use Workbench or Cloud Assistant to upload and download files in the following scenarios. The operating system type of the local computer is not limited.
If a single file is not larger than 500 MB, you can use Workbench to upload or download the file. For more information, see Use Workbench to upload or download a file that is not larger than to a Linux instance.
If a single file is not larger than 24 KB, you can use Cloud Assistant to upload or download the file. For more information, see Upload on-premises files to ECS instances.
Prerequisite
The ECS instance is in the Running state.
The external public IP address of the ECS instance is obtained.
NoteIf your ECS instance cannot communicate with the Internet, you can associate the instance with an elastic IP address (EIP). For more information, see Associate or disassociate an EIP.
Port 22 is open in the inbound rule of the security group to which the instance belongs. For more information, see Add security group rules.
Procedure
Use WinSCP to connect to an ECS instance
Download and install the WinSCP client on your on-premises Windows machine.
For more information about how to download and install WinSCP, visit the official WinSCP website.
Start WinSCP. The Login dialog box appears.
In the Session section, configure the parameters, as shown in the following figure.
Parameter description:
File protocol: Select SFTP or SCP.
Host name: Enter the public IP address of the Linux ECS instance.
Port number: The default port number is 22.
User name: Enter a username for the Linux ECS instance. The default username is root.
Password: Enter the password that you specified for the username when you created the Linux ECS instance, or enter the password that is converted from the key pair that is bound to the Linux ECS instance.
NoteIf you forget the password of the ECS instance, you can reset the password. For more information, see Reset the logon password of an instance.
Click Login.
Go to the file transfer page of the WinSCP window.
Upload or download a file
Upload a file to the ECS instance: Select a file on your on-premises machine on the left and drag the file to the ECS instance on the right to upload the file to the ECS instance.
Download a file to your on-premises machine: Select a file on the ECS instance on the right and drag the file to your on-premises machine on the left to download the file to your on-premises machine.
References
After you upload files to an ECS instance, you can back up these files. For more information, see Create a snapshot for a disk.
For more information about how to upload a local file to a Windows instance, see Upload or download a file to a Windows instance.
You can use Object Storage Service (OSS) to store and manage files. For more information, see Get started by using the OSS console.