If you are using a Windows computer, you can use WinSCP to connect to a Linux-based simple application server and manage files on the server. This topic describes how to use WinSCP to connect to a Linux server.

Prerequisites

WinSCP is downloaded and installed. For information about how to download and install WindSCP, visit the official WinSCP website.

Background information

This topic describes two methods used to connect to a Linux server by using WinSCP. You can choose a method to connect to the Linux server based on the actual conditions.

By default, Secure Shell (SSH) is not installed on Windows-based simple application servers. Therefore, WinSCP cannot be used to connect to Windows servers. To manage files on a Windows server, use Remote Desktop Connection (RDC) to connect to the server. For more information, see Connect to a Windows server.

Use a key pair to connect to a Linux server

  1. Create a key pair for the Linux server to which you want to connect.
    For more information, see Create a key pair.
    Note If a key pair is already created for the Linux server, skip this step.
  2. Start WinSCP and configure the key pair.
    1. Start WinSCP. In the Login dialog box, click Advanced... in the Session section.
      If the Login dialog box does not appear, you can choose Sessions > New Session... in the top-navigation bar of the WinSCP window to open the dialog box.
    2. In the left-side navigation pane of the Advanced Site Settings dialog box, choose SSH > Authentication.
    3. In the Authentication parameters section, click ... in the Private key file field.
    4. Select the server key file in the .pem format that is stored on your computer.
      If key files in the .pem format are not found, you must select All Private Key Files to view all private key files. All Private Key Files
    5. In the Confirm message, click OK.
      WinSCP supports only key files in the PuTTY format. After you click OK, WinSCP converts the key file from the .pem format to the PuTTY format.
    6. After the key file is converted, click OK in the Information message.
      The key file is converted into the .ppk format, as shown in the following figure. ppk
    7. In the Advanced Site Settings dialog box, click OK.
  3. Connect to the Linux server.
    1. In the Sessions section of the Login dialog box, configure parameters as shown in the following figure.
      root loginConfigure the following parameters:
      • File protocol: Select SCP from the drop-down list.
      • Host name: Enter the public IP address of the Linux server.
      • Port number: Enter 22.
      • User name: Enter root.
        Note If you want to connect to the Linux server by using a key pair, you do not need to configure the Password parameter.
    2. Click Login.
      After you are logged on to WinSCP, you can upload, download, create, or delete files. The following figure shows the WinSCP window. WinSCP windowThe workspace consists of the following sections:
      • ①: a section for information about the local host, in which directory information of the local host is shown.
      • ②: a section for information about the server, in which directory information of the Linux server is shown.

Use a password to connect to a Linux server

  1. Set a password for the root user of the Linux server to which you want to connect.
    For more information, see Reset the logon password of a simple application server. If a password is already set for the root user of the Linux server, skip this step.
  2. Start WinSCP. The Login dialog box appears.
    If the Login dialog box does not appear, you can choose Sessions > New Session... in the top-navigation bar of the WinSCP window to open the dialog box.
  3. In the Session section, configure parameters, as shown in the following figure.
    Logon with a passwordConfigure the following parameters:
    • File protocol: Select SCP from the drop-down list.
    • Host name: Enter the public IP address of the Linux server.
    • Port number: Enter 22.
    • User name: Enter root.
    • Password: Enter the password of the root user.
  4. Click Login.
    If the cache does not contain the host key of the server, the Warning dialog box appears. You can select Yes, No, or Cancel. In this example, select Yes.
    After you are logged on to WinSCP, you can upload, download, create, or delete files. The following figure shows the WinSCP window. WinSCP windowThe workspace consists of the following sections:
    • ①: a section for information about the local host, in which directory information of the local host is shown.
    • ②: a section for information about the server, in which directory information of the Linux server is shown.