All Products
Search
Document Center

Simple Application Server:Create and replace key pairs for Linux simple application servers

Last Updated:Jan 31, 2024

Alibaba Cloud provides the secure and convenient SSH key pair-based authentication method for logons to simple application servers. The key pairs are used for authentication and encrypted communication over the SSH protocol. A key pair consists of a public key and a private key. Only Linux simple application servers support SSH key pairs. If you have high requirements on security and convenience, you can create an SSH key pair for your simple application server. This topic describes how to create and replace an SSH key pair in the Simple Application Server console.

Limits

Only Linux simple application servers support SSH key pairs.

Procedure

If you want to log on to a simple application server by using a key pair, you must first create a key pair and restart the simple application server to make the key pair take effect. After the key pair takes effect, password-based logon is disabled by default. If you want to log on to the server by using a password again, you can enable password-based logon. For more information, see Re-enable password-based logon.

  1. Log on to the Simple Application Server console.

  2. In the left-side navigation pane, click Servers.

  3. Click the server ID in the card of the desired server.

  4. In the Basic Information section, click Create Key Pair below Key Pair.

    If you already have a key pair, click Replace Key Pair.

  5. In the dialog box that appears, configure parameters based on your business requirements.

    The following part describes the parameters:

    • Key Pair Name: Enter a name for the key pair. Example: test-ssh-01.

    • Creation Method:

      In this example, Automatically generate a key pair is selected.

      • Automatically generate a key pair: The key pair is automatically generated. Download the key pair and keep it confidential. A key pair can be downloaded only once.

      • Import Key Pair: Enter the public key of your on-premises key pair, and use the same key pair to manage multiple simple application servers.

  6. Click Confirm.

    Important

    Key pair information is automatically downloaded as a .pem file to your on-premises computer. A key pair can be downloaded only once. Keep it confidential.

  7. Restart the server to make key pair take effect. For more information, see View the card of a server on the Servers page.

    Warning

    The restart operation stops the instance for a short period of time and may interrupt services that are running on the instance. We recommend that you restart instances during off-peak hours.

    If you no longer require the key pair, click Delete Key Pair below Key Pair in the Basic Information section.

Related operation

After you create a key pair for a simple application server and restart the server for the new key pair to take effect, password-based logon is automatically disabled for the root account on the server. To enable password-based logon again, you must modify the configuration file of the server. For more information, see Re-enable password-based logon.