Ensure that your OpenStack compute virtual machines are configured to use SSH key pair authentication for remote access. When a key pair is assigned at launch, the public key is injected into the instance, allowing only users who possess the corresponding private key to gain shell access.
Using SSH key pairs to authenticate remote access to your OpenStack virtual machines represents a security best practice that significantly reduces the risk of unauthorized access. Without a key pair assigned, your instance may rely on image-defined default credentials or passwords retrievable from the console log, which are difficult to audit, hard to rotate, and shared across users. Unlike key-based authentication, password-based access cannot reliably attribute login activity to a specific individual, making it harder to detect and respond to unauthorized access attempts.
Audit
To determine if your OpenStack compute virtual machines are configured to use SSH key pair authentication, perform the following operations:
Remediation / Resolution
OpenStack does not support adding an SSH key pair to an existing running instance. To remediate this finding, you must create a new virtual machine with an SSH key pair assigned at launch. Perform the following operations:
References
- OpenStack Documentation
- Launch an instance - OpenStack End User Guide
- Instance metadata - OpenStack Nova Documentation
- OpenStack CLI Documentation
- server - OpenStack CLI Reference
- keypair - OpenStack CLI Reference