Limits

  • Each ECS instance can be attached to only one SSH key pair.
  • Except for the non-I/O-optimized instances of Generation I, all the Linux instances listed in the instance type families support the authentication method of SSH key pair.
  • If your ECS instance is in the Running status when you attach it to an SSH key pair, you must, restart it after the attachment.
  • If the ECS instance has already attached to an SSH key pair, after the new key pair is attached, the new key automatically replaces the original key.
  • If you use password-based authentication for Linux logon, the password authentication feature is automatically disabled after the key pair is attached.
  • After an SSH key pair is removed, you must reset the instance password for successful connection.

Attach an SSH key pair

To attach an SSH key pair to an ECS instance, follow these steps:

  1. Log on to the ECS console.
  2. In the left-side navigation pane, click Networks and Security > SSH Key Pair.
  3. Select the target region.
  4. Select the target key pair, and then click Bind in the Actions column.

  5. In the Bind dialog box, select one or more instances from the Select Instance box, and then click the icon > to move them to the Selected column.
    Note In the Select Instance box, the instances with gray names are either Windows instances or non-I/O-optimized instances of Generation I, for which SSH key pairs are not supported.
  6. Click OK.

Remove an SSH key pair

To remove an SSH key pair from an ECS instance, follow these steps:

  1. Log on to the ECS console.
  2. Select the target region.
  3. In the left-side navigation pane, click Networks and Security > SSH Key Pair.
  4. Select the target SSH key pair, and then click Unbindin the Actions column

  5. In the Unbind dialog, select one or more instances from the Select Instance box, and then click the icon > to move them to the Selected column.
  6. Click OK.