Dev.to Security πŸ” Cybersecurity πŸ‘ 0 πŸ“– 3 min read

Zero-SSH Private Amazon EKS Administration with AWS SSM Session Manager & Access Entries

Opening port 22 on a public jump box just to run kubectl and helm against a private Amazon EKS cluster is one of the fastest ways to trigger a cloud security audit finding. Even if you lock down SSH security groups to c

Opening port 22 on a public jump box just to run kubectl and helm against a private Amazon EKS cluster is one of the fastest ways to trigger a cloud security audit finding.

Even if you lock down SSH security groups to corporate VPN CIDRs, teams still end up rotating .pem keys manually, patching drifted bastion hosts, and maintaining a public IPv4 attack surface that does not need to exist.

In this practical guide, we walk through replacing public SSH jump hosts with a zero-SSH private Amazon EKS admin bastion accessed exclusively through AWS Systems Manager (SSM) Session Manager and Amazon EKS Access Entries.

1. Architecture: Zero Inbound Ports, Full Session Audit

Engineer Laptop (aws ssm start-session)
          β”‚  IAM Auth + TLS (No SSH keys, no port 22)
          β–Ό
  AWS Systems Manager (Session Manager)
          β”‚  Private VPC Endpoint / Outbound 443
          β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  Private Subnet: Hardened AL2023 EKS Admin Bastion       β”‚
β”‚  β€’ Zero inbound security group rules                     β”‚
β”‚  β€’ AWS CLI v2 + Session Manager Plugin                   β”‚
β”‚  β€’ kubectl (multi-version selector), Helm, eksctl, k9s   β”‚
β”‚  β€’ IAM Instance Profile -> EKS Access Entry              β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                            β”‚  Private Cluster Endpoint
                            β–Ό
                Private Amazon EKS Cluster

Why platform teams adopt this pattern:

  • Zero public IP & zero inbound rules: The bastion sits strictly in a private subnet.
  • IAM-governed access: Offboarding an engineer revokes IAM permissions instantly β€” no hunting for stale SSH keys across EC2 hosts.
  • Native compliance trail: Every SSM session can stream commands and output directly to CloudWatch Logs or encrypted S3 buckets.
  • Lower EC2 cost on AWS Graviton: A t4g.small or t4g.medium ARM64 admin host handles kubectl, helm, and k9s smoothly for ~20–30% less than x86_64 equivalents.

2. Minimal IAM & EKS Access Entry Setup

Step 1: Attach AmazonSSMManagedInstanceCore + Scoped eks:DescribeCluster

Attach AWS managed policy AmazonSSMManagedInstanceCore to your bastion's IAM Instance Profile, plus a minimal inline policy scoped to your cluster:

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Effect": "Allow",
      "Action": ["eks:DescribeCluster"],
      "Resource": "arn:aws:eks:us-east-1:123456789012:cluster/prod-eks"
    }
  ]
}

Step 2: Grant Cluster Access via EKS Access Entries (No aws-auth ConfigMap Editing)

aws eks create-access-entry \
  --cluster-name prod-eks \
  --principal-arn arn:aws:iam::123456789012:role/eks-admin-bastion-role

aws eks associate-access-policy \
  --cluster-name prod-eks \
  --principal-arn arn:aws:iam::123456789012:role/eks-admin-bastion-role \
  --policy-arn arn:aws:eks::aws:cluster-access-policy/AmazonEKSClusterAdminPolicy \
  --access-scope type=cluster

Step 3: Start an Audited Session & Verify Your Tooling

# Connect without SSH keys
aws ssm start-session --target i-0123456789abcdef0

# Inside the private bastion
aws eks update-kubeconfig --region us-east-1 --name prod-eks
kubectl get nodes
helm list -A
k9s

3. Hardening Verification Commands

Before standardizing a bastion AMI across production accounts, verify:

# Confirm SSM agent, auditd, and chronyd are healthy
sudo systemctl is-active amazon-ssm-agent auditd chronyd

# Verify root SSH & password auth are disabled
sudo sshd -T | grep -E 'permitrootlogin|passwordauthentication'

# Verify cluster CLI versions align with your EKS minor version
aws --version && kubectl version --client && helm version && eksctl version

4. Pre-Built Hardened SSM EKS Admin Bastion AMIs (x86_64 & Graviton ARM64)

If you want to skip building and patching custom jump-host AMIs every month, we maintain hardened, SSM-first Amazon Linux 2023 EKS Admin Bastion AMIs on AWS Marketplace with AWS CLI v2, kubectl version selector, Helm, eksctl, k9s, and least-privilege IAM examples preinstalled:

Browse our full AWS Marketplace catalog (including hardened CUDA GPU AMIs and private Open WebUI + Ollama + vLLM AI sandboxes) at corenovacloud.com/en/products. Questions or custom enterprise IAM templates? Reach us at [email protected].

πŸ“° Read the original article on Dev.to Security

Originally published by Dev.to Security. Aggregated on AIWithGhost for educational purposes β€” full credit and traffic to the original publisher.