SSH-01: Remote access hardening¶
| Property | Value |
|---|---|
| Severity | high |
| Platform | AWS Nitro Enclaves |
| Lifecycle stage | runtime |
| Mode | Active: runs fixed read-only commands on the host. Skipped with --read-only. |
What it checks¶
It passes when:
- SSH is disabled and EC2 Instance Connect is not installed.
Example failures:
- SSH daemon (sshd) is running | EC2 Instance Connect is installed
How to fix¶
- Disable SSH: systemctl disable --now sshd Remove EC2 Instance Connect: dnf remove -y ec2-instance-connect || apt remove -y ec2-instance-connect Use SSM Session Manager for all shell access.
After the fix, scan again: the check should report PASS.
When it is not assessed¶
SKIP:
- No instance ID specified; skipping check.
ERROR:
- SSM command did not complete within timeout.
- Could not send SSM command: …
Scan inputs¶
The untrust scan options this check reads:
| Option | Description |
|---|---|
--instance-id |
EC2 instance ID running the Nitro Enclave. |
--region |
AWS region. |
Permissions¶
The cloud API calls this check makes, read from the scanner's source:
| Cloud | API call | Permission | Access |
|---|---|---|---|
| AWS | ssm.get_command_invocation |
ssm:GetCommandInvocation |
read |
| AWS | ssm.send_command |
ssm:SendCommand |
run command |
Every AWS scan also calls sts:GetCallerIdentity. See Required permissions for a complete policy.
Related¶
- Runtime detection
DET-04(AWS Nitro Enclaves): Interactive access attempt on the enclave host - Runtime detection
DET-H11(Hardware fleets): Root login on a TEE host - Runtime detection
DET-H12(Hardware fleets): New root SSH key authorized - Runtime detection
DET-H13(Hardware fleets): Root SSH login policy changed - Runtime detection
DET-H14(Hardware fleets): Root SSH visibility lost
Evidence recorded¶
Keys in the finding's evidence: ec2ic_installed, ssh_port, ssh_status
Generated from untrust 1.3.0 (commit 7ef462d9a0c3).