Uploading Files to a Linux CVM via WinSCP on Windows

Last Updated At: 2025-10-21 09:10:00

Overview

WinSCP is an open-source graphical SFTP client for Windows that uses SSH and also supports the SCP protocol. Its main function is to securely copy files between local and remote computers. Compared with uploading code using FTP, WinSCP allows you to directly use the server account password to access the server without any configuration on the server side.

Prerequisites

WinSCP client is downloaded and installed on your local computer (recommended to get the latest version from the official website).

Directions

Logging in to WinSCP

  1. Open WinSCP, the "WinSCP login to " dialog box pops up.
  2. Set the login parameters:
    • Protocol: Select either SFTP or SCP.
    • Host name: the public IP address of the CVM. You can view the public IP address of the corresponding CVM in the CVM console.
    • Port: Default is 22.
    • Password: The password corresponding to the CVM user account.
    • Username: The system username of the CVM.
      • SUSE/CentOS/Debian systems: root
      • Ubuntu systems: ubuntu
  3. click [log in to], to enter the "WinSCP" file transfer interface.

Uploading Files

  1. In the right pane of the WinSCP file transfer interface, select the directory on the server where the file will be stored, such as "/user".
  2. In the left pane of the WinSCP file transfer interface, select the directory where the files are stored, such as "F:\SSL Certificate\Nginx", and select the file to be transferred.
  3. In the "WinSCP" file transfer interface menu bar, click [Upload].
  4. In the pop-up Upload dialog box, confirm the file to be uploaded and the remote directory, and click OK to upload the file from the local computer to the CVM.

Downloading Files

  1. In the left pane of the WinSCP file transfer interface, select the directory where the file will be stored on the server, such as "F:\SSL Certificate\Nginx".
  2. In the right pane of the WinSCP file transfer interface, select the directory where the files are stored, such as "/user", and select the files to be transferred.
  3. In the "WinSCP" file transfer interface menu bar, click [Download].
  4. In the pop-up Download dialog box, confirm the file to be downloaded and the remote directory, and click OK to download the file from the CVM to the local computer.