Check provider logo

ECS instances should use SSH key pairs for authentication

ecs_instance_key_pair

Severityhigh
Serviceecs
by Prowler

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
  1. Log on to the Huawei Cloud console
  2. Navigate to Elastic Cloud Server
  3. Select the instance
  4. Click More > Manage Key Pair
  5. Bind an existing key pair or create a new one
  6. Disable password-based login

Source Code

Resource Type

NotDefined

References