Upload files to a remote server using Eclipse

更新时间:
复制 MD 格式

Cloud Toolkit lets you upload single files, multiple files, or entire folders to Linux or Windows servers. This topic describes how to use Cloud Toolkit in Eclipse to upload files to a remote server.

Prerequisites

Step 1: Add a server

Cloud Toolkit provides two methods to add a remote server. If you have a server that supports the Secure Shell Protocol (SSH), you can add it directly. If you do not have a server, you can purchase and add an Alibaba Cloud ECS instance.

Add an existing remote server

  1. In the Eclipse menu bar, click the Alibaba Cloud icon, and then choose Alibaba Cloud explorer > Host.
  2. On the Host tab, click Add Host.
  3. In the Add Host dialog box, enter the host information and click Test Connection. If the connection is successful, click Add.
    After the server is added, it appears on the Host tab.
    Parameter Description
    Upload Uploads a single file, multiple files, or a folder to the remote server.
    Terminal Logs on to the terminal of the remote server.
    Properties Views the information about the remote server.
    Remove Removes the remote server.

Purchase an Alibaba Cloud ECS instance

  1. In the Eclipse menu bar, click the Alibaba Cloud icon, and then choose Alibaba Cloud explorer > Host.
  2. In the upper-right corner of the Alibaba Cloud ECS tab, click Create Instance. You are redirected to the Alibaba Cloud ECS purchase page to purchase an instance.
    After the purchase is complete, the ECS instance in the virtual private cloud (VPC) appears on the Alibaba Cloud ECS tab.

Step 2: Upload files

  1. On the Host or Alibaba Cloud ECS tab, click Upload in the Actions column of the target server.
  2. In the Upload dialog box, select the files or folders to upload, set the deployment parameters, and then click Upload.
    Parameter Description
    File Select the files to upload. You can select local files or specify a remote file URL. For local files, you can select a single file, multiple files, or a folder.
    Location The path on the remote server where you want to upload the files or folders.
    Command (Optional) The command to run on the remote server after the upload is complete. For example, you can enter a command to decompress a compressed file or a start command. This field is not required if you are only uploading files or folders. If you are deploying an application, enter the start command for the application here.
    Note On a Windows server, the Command field supports all PowerShell commands by default. It does not directly support DOS commands. To use DOS commands, run them from a batch script (.bat or .cmd).

Verify the results

After the deployment starts, you can check the deployment log in the Eclipse Console to verify the upload. You can also log on to the remote server using the built-in terminal. Navigate to the upload path and run the `ls` command to confirm that the upload was successful.