Technology Encyclopedia Home >How to upload files to Linux cloud server using WinSCP?

How to upload files to Linux cloud server using WinSCP?

To upload files to a Linux cloud server using WinSCP, follow these steps:

  1. Download and Install WinSCP:

    • Get WinSCP from its official website and install it on your Windows computer.
  2. Launch WinSCP and Connect to the Server:

    • Open WinSCP and select Session > New Session.
    • Enter your Linux cloud server's Host name (IP address or domain name), Username (e.g., root or a sudo user), and Password (or use SSH key authentication).
    • Set the File protocol to SFTP (recommended) or SCP.
    • Click Login to connect.
  3. Authenticate (Password or SSH Key):

    • If using a password, enter it when prompted.
    • If using an SSH key, load the private key file in WinSCP’s advanced settings under SSH > Authentication.
  4. Upload Files:

    • After logging in, WinSCP shows a split interface: the left panel is your local computer, and the right panel is the remote Linux server.
    • Navigate to the local file you want to upload in the left panel.
    • Navigate to the target directory on the server in the right panel (e.g., /var/www/html for web files).
    • Drag and drop the file from the left panel to the right panel to start the upload.
  5. Verify the Upload:

    • Check the server’s directory in WinSCP to confirm the file is uploaded.
    • You can also verify via SSH (e.g., ls -l /target/directory).

Example:
If you’re deploying a website, upload HTML/CSS files to /var/www/html on the server.

For secure and scalable cloud storage, Tencent Cloud provides CVM (Cloud Virtual Machine) for Linux servers and COS (Cloud Object Storage) for large-scale file storage. WinSCP works seamlessly with Tencent Cloud CVM instances.