If your on-premises computer runs Windows, you can install WinSCP to remotely connect to a Linux ECS instance and transfer files through a graphical interface.
What is WinSCP?
Unlike FTP, WinSCP lets you access the server directly with your server account, requiring no server-side configuration.
Scenarios
Upload files: Upload files from a Windows computer to a Linux instance.
Download files: Download files from a Linux instance to a Windows computer.
Limits
File size: No limit.
Transfer speed: No limit.
Number of files: No limit.
Network requirements: The instance must have a public IP address or an elastic IP address.
WinSCP runs only on Windows. If you use Linux or macOS, you must use other file transfer methods. For more information, see Select a file transfer method.
Prerequisites
The instance must be in the Running state.
A public IP address is required to connect to the instance.
Make sure the instance's security group allows inbound traffic on port 22, the default for SCP and SFTP.
Procedure
To improve transfer efficiency for large or numerous files, compress them into a single package before uploading. For more information, see Compress and upload files.
Step 1: Connect to the instance with WinSCP
On your Windows computer, download and install WinSCP.
For more information, visit the official WinSCP website.
Start WinSCP. The Login dialog box opens.
In the Session section, configure the following parameters.
The following list describes the parameters.
File protocol: Select SFTP or SCP.
Host name: The public IP address of the Linux ECS instance.
Port number: The default value is 22.
User name: The username for the instance. The default is root.
Password: The password for your instance.
NoteIf you forget the password of your Linux ECS instance, you can reset the password. For more information, see Reset the logon password of an instance.
Click Save to store this connection information for future use.
Click Login.
The WinSCP file transfer window opens.
Step 2: Upload or download files
On the WinSCP file transfer page, the left pane displays your local directories, and the right pane displays the instance's directories.
Upload files to an ECS instance
Drag files from the left pane to the right pane to upload the files to the ECS instance.
For example, the directory in the left pane is
C:\Users\Administrator\Documents\and contains thetest.txtfile to upload. The directory in the right pane is/home/ecs-user/.Download files to your on-premises computer
Drag files from the right pane to the left pane to download the files from the ECS instance to your on-premises computer.
FAQ
Transfer files with sudo
Related topics
After uploading important files to an ECS instance, consider creating a snapshot to back them up. For more information, see Create a manual snapshot.
This guide covers file transfers between a Windows computer and a Linux instance. To transfer files to a Windows instance, you must use a different method. For more information, see Select a file transfer method.
You can also use OSS to store and manage files. For more information, see OSS Quick Start.