An SSH key pair can be used to log in to multiple Linux KEC instances. This topic describes how to attach and detach key pairs to or from KEC instances.
Attach key pairs to instances
You can attach up to 10 key pairs to a KEC instance.
Precautions
- Attaching key pairs is only supported for KEC instances in the Stopped state.
- Port 22 must be allowed in the inbound rules of the security group containing the KEC instance. For details on security group settings, see Configure a security group.
Procedure
- Log in to the KEC console. The KEC instance page appears by default.
- In the KEC instance list, find the target KEC instance and then choose More > Password/Key > Bind Key in the Operation column.
- In the dialog box that appears, select one or more keys to be attached and then click OK.
Detach key pairs from instances
You can detach all SSH key pairs attached to your KEC instance at one time.
Precautions
You can only detach key pairs for KEC instances in the Stopped state.
Procedure
- Log in to the KEC console. The KEC instance page appears by default.
- In the KEC instance list, find the target KEC instance and then choose More > Password/Key > Unbind Key in the Operation column.
- In the dialog box that appears, click OK.