Skip to content

Plain Linux spawn launch into a default VPC waits 2 min for SSH and fails: only the VPC default SG is attached, and it has no port-22 rule #1296

Closed

Description

@scttfrdmn

Seen: v0.143.0 post-release smoke test, dev account, us-west-2, 2026-10-24. Command: spawn launch smoke143 --instance-type t4g.small --ttl 15m --region us-west-2 --yes.

❌ Error: SSH (port 22) on 54.214.135.215 did not become reachable within 2m0s: dial tcp 54.214.135.215:22: i/o timeout
⚠️  SSH never became reachable ...
✅ Verifying spored agent (up to 5 min) (232ms)

The instance was healthy:

  • the bootstrap body was verified;
  • the user was configured;
  • spored 0.143.0 was sending heartbeats.

The SSH failure is a network issue, not a boot issue.

Cause: ensureSecurityGroup (cmd/launch_single.go:1261) creates a managed security group only for MPI or Windows. For a plain Linux launch it does nothing, so the instance gets the VPC's default security group. Here that group has exactly one inbound rule: all traffic from itself. That is AWS's stock default, so port 22 is closed. CloudTrail shows no change to that group in the last 7 days, so this is not a removed rule. It is how a fresh default VPC behaves.

Effect:

  • Every plain Linux spawn launch into an unmodified default VPC spends the 2-minute --wait-for-ssh timeout, then prints an error.
  • spawn connect works only through the SSM fallback.
  • Anyone who expects SSH (ssh, scp, port forwarding) gets an i/o timeout and no explanation.

Spawn creates its own security groups only for MPI and Windows.

Decide:

  1. Create a managed SSH security group for Linux launches, mirroring the Windows path. Allow port 22 from --allow-cidr, defaulting to the caller's public IP /32 rather than 0.0.0.0/0. Tag it spawn:managed=true, and give it a deleter when the last instance using it is gone, per Sizing: on a price tie, prefer the smallest type that fits (hpc7g cpu=16 → hpc7g.16xlarge) #610.
  2. Or make the default connect path SSM-only. Skip the SSH wait unless SSH is requested, and when the attached groups don't open port 22, say so up front instead of after a 2-minute timeout.

Either way, the launch should know before waiting whether port 22 can be reached.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions