If your local host runs on Windows, you can install WinSCP to establish a remote connection with a Linux ECS instance, enabling visual file uploads and downloads.
What is WinSCP?
WinSCP is a file transfer client for Windows users to securely replicate files to and from a Linux system. It offers a secure alternative to FTP, allowing server access with a username and password without additional server configurations.
Scenarios
Upload files: Transfer files from a Windows system to a Linux instance.
Download files: Retrieve files from a Linux instance to a Windows system.
Limits
File size: There are no restrictions.
Transfer speed: There are no restrictions.
Number of files: There are no restrictions.
Network requirements: The instance must be assigned a public IP or EIP.
WinSCP is only compatible with Windows systems. For Linux or macOS, other file transfer methods are available. For more information, see the referenced document.
Preparations
Check the instance status: Ensure that the instance is in the Running state to perform the operations described in this topic.
Obtain the public IP address of the instance: The public IP address is required to connect to the instance for the operations described in this topic.
Check the security group of the instance: Verify that the security group settings permit connections to the SCP or SFTP port (default is port 22) for file transfers using WinSCP.
Procedure
For efficient transfer of large or multiple files, consider compressing them into a single package before uploading. For more information, see the referenced document.
Step 1: Connect to the instance using WinSCP
Download and install WinSCP on your local Windows machine.
For more information, visit the or the WinSCP official website.
Launch WinSCP, and the Logon dialog box will appear.
In the Session section, enter the following details.
The table below explains the configuration items.
File protocol: Choose either SFTP or SCP.
Hostname: Enter the public IP address of the Linux server.
Port number: The default is 22.
Username: Use the server login username, typically root.
Password: Enter the password you set when creating the Linux server.
NoteIf you have forgotten the ECS instance password, you can reset it. For more information, see the referenced document.
After configuring, click Save to store the instance connection details for future use.
Click Logon.
This will take you to the WinSCP file transfer interface.
Step 2: Upload or download files
On the WinSCP file transfer page, the left panel represents your local directory, while the right panel shows the directory of the ECS instance.
Upload Files to the ECS Instance
You can upload files to the ECS instance by dragging them from the left directory to the right directory.
Download Files to Local
Drag and drop files from the right panel to the left to download them to your local machine.
FAQ
How to transfer files to a directory using sudo permissions? (For example, how ecs-user uses the upload function)
References
After uploading files to an ECS instance, consider creating a backup. For more information, see the referenced document.
The methods described in this topic are specific to transferring files between a local Windows system and a Linux instance. For uploading files to a Windows instance, other methods are required. For more information, see the referenced document.
Object Storage Service (OSS) can also be used for file storage and management. For more information, see the referenced document.