Manage Simple Application Server with Alibaba Cloud Client

更新时间:
复制 MD 格式

Alibaba Cloud Client lets you query resource configurations, view usage, and remotely connect to Simple Application Server instances from your local machine.

Prerequisites

Connect to a Simple Application Server instance

The available remote connection methods differ between Linux and Windows instances.

Linux instances

  • File Manager (SFTP): View and manage files on your Linux server over SFTP.

  • Remote Connect (SSH): Connect to the instance over SSH by using its public IP address.

  • Start a remote session: Connect to the instance through the Session Manager feature of Cloud Assistant, without requiring a password or public IP address.

    Note

    Cloud Assistant (also known as Command Assistant) is enabled by default when you create a Simple Application Server instance. For more information, see Command Assistant.

File Manager (SFTP)

  1. On the client's Homepage, click image SWAS to open the Servers list page.

  2. Above the instance list, select the region where the instance is located.

  3. Find the target instance. In the Actions column, choose Actions > File Manager (SFTP)....

  4. Enter the Username (default: root), Port (default: 22), and select an Authentication. You can configure different default values.

    You can select one of the following authentication methods:

    • Password: Enter the password for your Simple Application Server instance.

      Note

      In the client, you can choose Configure > > > SSH to save the password to a Local File or Key Management Service (KMS). For more information, see Alibaba Cloud Client application configuration.

    • Key pair file: Select an SSH private key file from the ~/.ssh/ directory or choose a file from another location.

    • Temporary key pair: Cloud Assistant generates a temporary key pair and sends the public key to the instance.

  5. Click Connect.

    After logging on, you can view and manage the files on your Linux server.

Remote Connect (SSH)

  1. On the Home page of the client, click imageSWAS to go to the Servers page.

  2. In the upper-left corner of the page, select the region of the server to which you want to connect.

  3. Find the target instance. In the Actions column, choose Actions > Remote Connect (SSH)....

  4. Enter the Username (default: root), Port (default: 22), and select an Authentication. You can configure different default values.

    You can select one of the following authentication methods:

    • Password: Enter the password for your Simple Application Server instance.

      Note

      In the client, you can choose Configure > > > SSH to save the password to a Local File or Key Management Service (KMS). For more information, see Alibaba Cloud Client application configuration.

    • Key pair file: Select an SSH private key file from the ~/.ssh/ directory or choose a file from another location.

      Note

      If the Private Key list is empty, you must add an SSH key first. For more information, see Add an SSH key.

    • Temporary key pair: Cloud Assistant generates a temporary key pair and sends the public key to the instance.

  5. Click Connect.

    After logging on, the terminal displays the following output:

    Key fingerprint: xxx
    Welcome to Alibaba Cloud Elastic Compute Service
    
    Last login: xxx
    [root@xxx ~]#
    Note

    The logon screen may vary depending on the Linux distribution. The preceding output is for reference only.

Session Manager

  1. On the Home page of the client, click imageSWAS to go to the Servers page.

  2. In the upper-left corner of the page, select the region of the server to which you want to connect.

  3. Find the target instance. In the Actions column, choose Actions > Start remote session.

  4. After logging on, the terminal displays the following output:

    # Starting new session with SessionId: s-hxxx
    [0] Alibaba Cloud xxx Session Manager connected
    
    [ecs-assist-user@xxx ~]$
    Note

    The logon screen may vary depending on the Linux distribution. The preceding output is for reference only.

Windows instances

  • Remote Desktop (RDP): Connect to the Remote Desktop by using the public IP address.

  • Start a remote session: Connect to the instance through the Session Manager feature of Cloud Assistant, without requiring a password or public IP address.

    Note

    Cloud Assistant (also known as Command Assistant) is enabled by default when you create a Simple Application Server instance. For more information, see Command Assistant.

Remote Desktop (RDP)

  1. On the Home page of the client, click imageSWAS to go to the Servers page.

  2. In the upper-left corner of the page, select the region of the server to which you want to connect.

  3. Find the target instance. In the Actions column, choose Actions > Remote Desktop (RDP).

  4. Enter the Username (default: Administrator), Port (default: 3389), and configure the Screen Mode and Audio Mode options, and then click Connect.

    You can select Window mode or Full-screen mode for the display, and Play on this computer or Mute for audio.

  5. In the Remote Desktop Connection dialog box, review the information and click Connect.

  6. In the Windows Security dialog box, enter the instance's Administrator Account account and Password.

    Note

    If a dialog box appears with the message The identity of the remote computer cannot be verified. Do you want to connect anyway?, you can select the Don't ask me again for connections to this computer checkbox and click Connect.

  7. Click OK to log on to the Remote Desktop of your Windows Simple Application Server instance.

Session Manager

  1. On the Home page of the client, click imageSWAS to go to the Servers page.

  2. In the upper-left corner of the page, select the region of the server to which you want to connect.

  3. Find the target instance. In the Actions column, choose Actions > Start remote session.

  4. After logging on, the terminal displays the following output:

    # Starting new session with SessionId: s-hxxx
    [0] Windo xxx .30) Session Manager connected
    
    Windows PowerShell
    Copyright (C) Microsoft Corporation. All rights reserved.
    
    Install the latest PowerShell for new features and improvements! https://aka.ms/PSWindows
    
    PS C:\Windows\system32>
    Note

    The logon screen may vary depending on the Windows operating system. The preceding output is for reference only.

Start, stop, or restart an instance

You can start, stop, or restart an instance from the client.

Important

Stops an instance.: This action performs a normal shutdown. The instance is retained, and billing continues.

  1. On the Home page of the client, click imageSWAS to go to the Servers page.

  2. In the upper-left corner of the page, select the region of the server to which you want to connect.

  3. Find the target instance. In the Actions column, choose Actions > Restart/Stop/Start Instance.

  4. In the dialog box that appears, confirm the instance information, and then click Restart/Stop/Start Instance.

Reset the instance password

The client uses asymmetric encryption to transmit the password, ensuring it cannot be decrypted in transit. The new password takes effect immediately without an instance restart.

Important

You can only reset the administrator password.

  1. On the Home page of the client, click imageSWAS to go to the Servers page.

  2. In the upper-left corner of the page, select the region of the server to which you want to connect.

  3. Find the target instance. In the Actions column, choose Actions > Reset Instance Password.

  4. In the dialog box that appears, confirm the Logon Name, enter the New Password, and Enter Password Again, and then click Reset Instance Password.

Add an SSH key (Linux instances only)

SSH key pair authentication provides secure, password-free logon. When you add a key pair, the client adds the public key to the instance and stores the private key locally.

  1. On the Home page of the client, click imageSWAS to go to the Servers page.

  2. In the upper-left corner of the page, select the region of the server to which you want to connect.

  3. Find the target instance. In the Actions column, choose Actions > Add SSH Key.

  4. In the dialog box that appears, enter the Username, select the Key pair file, enter the File password, select a Change mode, and then click Add SSH Key.

    Note

    Search for available private key files in the ~/.ssh/ directory. If the folder is empty, you must create a key pair and a private key first. For more information, see Manage key pairs (Linux) and Generate a private key.

    The Change mode supports Append key (retains existing keys for the user on the instance and adds the new key) and Replace key (replaces all existing keys for this user with the new key).

    After the key is added, its status in the Background Task view changes to Completed.

Manage firewall rules

You can view, add, modify, or delete firewall rules. The rule list displays attributes such as policy, protocol, and port range.

  1. On the Home page of the client, click imageSWAS to go to the Servers page.

  2. In the upper-left corner of the page, select the region of the server to which you want to connect.

  3. Find the target instance and open the firewall rules page by using one of the following methods:

    • Method 1: In the Actions column, choose Actions > View Firewall Rules....

    • Method 2: In the Firewall column, click the image icon.

Add a new rule

  1. On the Firewall Rules page, click Add New Rule.

    The dialog box also includes a Description field and Common quick options (SSH, Telnet, RDP, MySQL, MS SQL, HTTP, and HTTPS) to quickly fill in the corresponding protocol and port.

  2. In the dialog box that appears, select a Policy, select a Protocol Type, enter the Destination Port and Source IP, and then click Add New Rule.

Modify an authorization policy

  1. On the Firewall Rules page, find the rule you want to modify. In the Actions column, choose Actions > Modify Authorization Policy.

  2. In the dialog box that appears, select Allow or Deny, and then click Modify Authorization Policy.

Warning

Selecting Deny may cause connection timeouts or failures for some of your services.

Delete a rule

  1. On the Firewall Rules page, find the rule you want to delete. In the Actions column, choose Actions > Delete Rule.

  2. In the dialog box that appears, click Delete Rule or Cancel.

Warning

Deleting a rule may cause connection timeouts or failures for some of your services.

View properties

On the Firewall Rules page, find the rule that you want to view. In the Actions column, choose Actions > View Property. You can view the Rule ID, whether the Policy is allowed, the Protocol type, the Source IP, and the Port Range for the rule.

View instance monitoring information

Cloud Monitor displays CPU, memory, disk, and network usage for an instance over a specified time period.

  1. On the Home page of the client, click imageSWAS to go to the Servers page.

  2. In the upper-left corner of the page, select the region of the server to which you want to connect.

  3. Find the target instance and open the monitoring information page by using one of the following methods:

    • Method 1: In the Actions column, choose Actions > View Instance Monitor....

    • Method 2: In the Metrics column, click the 监控图标.png icon.

View instance properties

View basic instance information, including the region, instance ID, image, expiration time, and Cloud Assistant status.

  1. On the Home page of the client, click imageSWAS to go to the Servers page.

  2. In the upper-left corner of the page, select the region of the server to which you want to connect.

  3. Find the target instance. In the Actions column, choose Actions > View Property.