Ensure that Elastic Cloud Server (ECS) instances use SSH key pairs instead of password-based authentication for secure access.
Risk
ECS instances without SSH key pairs may rely on password-based authentication, which is more susceptible to brute-force attacks and unauthorized access.
Run this check with Prowler CLI
prowler huaweicloud --checks ecs_instance_key_pair
Recommendation
Bind SSH key pairs to all ECS instances and disable password-based authentication.
Remediation
CLI
hcloud ECS ReinstallServerWithCloudInit --server_id=<instance_id> --os-reinstall.keyname=<key_pair_name>
Other
- Log on to the Huawei Cloud console
- Navigate to Elastic Cloud Server
- Select the instance
- Click More > Manage Key Pair
- Bind an existing key pair or create a new one
- Disable password-based login
Source Code
Resource Type
NotDefined