Black Friday sale: an extra 40% off every course until Monday, November 30.New Year sale: an extra 30% off every course until Friday, January 1.Memorial Day sale: an extra 25% off every course until Monday, May 31.SysAdmin Day sale: an extra 25% off every course until Sunday, August 1.Back to School sale: an extra 25% off every course until Sunday, August 22.Labor Day sale: an extra 25% off every course until Monday, September 6.Black Friday sale: an extra 40% off every course until Monday, November 29.New Year sale: an extra 30% off every course until Saturday, January 1.Last day of our Black Friday sale: an extra 40% off every course.Last day of our New Year sale: an extra 30% off every course.Last day of our Memorial Day sale: an extra 25% off every course.Last day of our SysAdmin Day sale: an extra 25% off every course.Last day of our Back to School sale: an extra 25% off every course.Last day of our Labor Day sale: an extra 25% off every course.Last day of our Black Friday sale: an extra 40% off every course.Last day of our New Year sale: an extra 30% off every course. Ends at midnight ETChoose your certification →

Copyright (c) 2026 MindMesh Academy. All rights reserved. This content is proprietary and may not be reproduced or distributed without permission.

4.2.5. Secure Administrative Access

First Principle: Administrative access to compute resources is the highest-risk access pattern — a compromised admin session gives an attacker everything. Eliminating SSH keys and bastion hosts in favor of auditable, just-in-time access dramatically reduces this attack surface.

Systems Manager Session Manager:
  • Browser-based or CLI shell access to EC2 instances without inbound SSH ports
  • All sessions logged to CloudTrail and optionally to S3/CloudWatch for complete audit trail
  • IAM-based access control: who can start sessions, on which instances
  • No SSH keys, no bastion hosts, no open security group ports
  • Works through the SSM Agent (already installed on most Amazon Linux/Windows AMIs)
  • The same agent channel serves Run Command (scripts across a fleet) and Patch Manager (patching), so routine administration needs no SSH at all
  • Session Manager only reaches managed nodes. To prove agent coverage across accounts, deploy the AWS Config managed rule ec2-instance-managed-by-systems-manager, which flags running instances whose SSM Agent isn't managing them, and view results through a Config aggregator
EC2 Instance Connect:
  • Push a temporary SSH public key to the instance metadata for a single connection
  • Key expires after 60 seconds — no persistent SSH keys
  • Requires the Instance Connect agent (pre-installed on recent AMIs)
  • IAM controls who can push keys to which instances
Comparison:
FeatureSession ManagerEC2 Instance Connect
ProtocolCustom (SSM channel)SSH
Ports requiredNone (outbound HTTPS only)Port 22 (inbound)
Audit loggingCloudTrail + S3/CloudWatchCloudTrail only
Key managementNo keysTemporary keys (60s)
VPC connectivityVPC endpoint or internetDirect or VPC endpoint

⚠️ Exam Trap: Session Manager requires NO inbound security group rules. If a question asks about secure admin access without opening SSH ports, Session Manager is the answer.

Scenario: An auditor asks how admin access is controlled for EC2 instances. You demonstrate: no SSH keys in use, no port 22 open, all sessions via Session Manager with IAM policies limiting access to specific instance tags, and all session activity logged to an immutable S3 bucket.

Reflection Question: Why does eliminating SSH keys and bastion hosts improve security even if the bastion was well-hardened?

See how it connects
Alvin Varughese
Written byAlvin Varughese
Founder•26 professional certifications earned