If you use a third-party key generation tool to generate an RSA key pair, you can import its public key into Alibaba Cloud. For information about supported types of imported key pairs, see SSH key pairs.

Note To guarantee the security of your instance, store the private key of the key pair securely and do not import the private key to Alibaba Cloud.

To import an SSH key pair, you must have generated a key pair, and the public key to be imported into Alibaba Cloud must be Base64-encoded.

To import an SSH key pair, follow these steps:

  1. Log on to the ECS console.
  2. In the left-side navigation pane, select Networks and Security > SSH Key Pair.
  3. Click Create SSH Key Pair.
  4. Select the target region.
  5. On the Create SSH Key Pair page, enter a name for the key pair, and select Import SSH Key Pair, and then enter the Public Key.
    Note The specified key pair name must be unique under the Alibaba Cloud account. That is, the name must not be the same as that of an existing key pair or a key pair that was bound to an instance but has since been deleted. Otherwise, the error message "The key pair already exists" appears.

  6. Click OK.

After creation, you can view the information, including the key pair Name and Fingerprint, in the key pair list.