When I used a key file to attempt to log in to an instance in an AS group, the login failed.
The image in the AS configuration of the AS group is your private one, and the Cloud-Init tool had not been installed when you created the private image.
If the Cloud-Init tool had not been installed when you created a private image, you would fail to customize the ECS configuration. In such a case, you can log in to the ECS only using the original image password or key pair.
The original image password or key pair is the OS password or key pair configured when the private image was created.
Make sure that the Cloud-Init or Cloudbase-Init tool has been installed in the image of the modified AS configuration. For instructions about how to install the Cloud-Init or Cloudbase-Init tool, see Image Management Service User Guide.
After the AS configuration is modified, you can use the key file to log in to the new ECSs that are added when the AS action is performed in the AS group. In such a case, you do not need to use the original image password or key pair to log in to the new ECSs any more.