SSH proxy feature

更新时间:
复制 MD 格式

If your local server cannot connect to a remote deployment server due to network isolation, you can use a proxy server, also known as a jump server, to establish connectivity. Cloud Toolkit supports this scenario with its Secure Shell (SSH) proxy feature. You can add a proxy server, add the deployment server, and configure the proxy settings to quickly connect your environment.

Background information

If a local server cannot connect to a remote server with the IP address 192.168.0.1, a proxy server with the IP address 13.14.XX.XX is typically used to establish network connectivity, as shown in the following figure.

Figure 1. Jump server 跳板机

The process of connecting your local server to a remote deployment server using the SSH proxy feature in Cloud Toolkit involves the following steps:

  1. Add Server P as the proxy server.
  2. Add Server T as the remote server.
  3. You can set proxy P for server T.

Prerequisites

You must install and configure Cloud Toolkit in your local integrated development environment (IDE).

Step 1: Add the proxy server

The following steps use IntelliJ IDEA on Windows as an example.

  1. In the top navigation bar of IntelliJ IDEA, choose Tools > Alibaba Cloud > Alibaba Cloud View > Host.
  2. On the Host tab, click Add Host in the upper-right corner.
  3. In the Add Host dialog box, enter the IP address, username, and password of the proxy server.

    In this example, Server P is added as the proxy server. Its IP address is 13.14.XX.XX.

    Figure 2. Add proxy server
  4. Click Test Connection.

    If the message Test succeeded appears, the connection is successful.

  5. Click Add.

Step 2: Add the remote server

  1. On the Host tab, click Add Host in the upper-right corner.
  2. In the Add Host dialog box, enter the IP address, username, and password of the remote server.

    In this example, Server T is added as the remote server. Its IP address is 192.168.0.1.

    Figure 3. Add remote server
  3. Click Test Connection.

    If the message Test succeeded appears, the connection is successful.

  4. Click Add.

Step 3: Set the proxy

Set Server P as the proxy for Server T to establish a connection from your local server to Server T. Follow these steps:

  1. On the Host tab, find Server T and choose More > Properties from the Action
  2. In the Properties dialog box, click the Advanced tab.
  3. On the Advanced tab, in the SSH Proxy section, select Server P, which you added in Step 1.
    Figure 4. Set proxy
  4. Click Add.

Verify the result

Log on to your local server and run the ping command on Server T. If the following result appears, the setup is successful.