Ensure SSH key set in authorized_keys
Description
This policy checks whether an SSH key is set in the authorized_keys for a Linode instance. Setting an SSH key in authorized_keys is crucial for secure access to the instance, as it allows only authorized users to connect via SSH. Without a set SSH key, the instance may be vulnerable to unauthorized access. It is essential to configure authorized_keys to ensure the security and integrity of the instance.
Code Example
terraform
resource "linode_instance" "example" {
authorized_keys = ["ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC..."]
}Remediation
Set the authorized_keys attribute in the linode_instance resource to a valid SSH key.
Rule Details
| Field | Value |
|---|---|
| ID | IAC-1199 |
| Severity | MEDIUM |
| IaC Type | Terraform |
| Frameworks | linode_instance |
| Checkov ID | CKV_LIN_2 |