Skip to content

spawn extend: TTL reload SSHes as ec2-user, silently no-ops on Ubuntu AMIs #581

Closed

Description

@scttfrdmn

spawn extend doesn't apply the new TTL on-box: reload SSHes as ec2-user on Ubuntu AMIs

spawn extend <name> <duration> updates the TTL but then tries to reload the on-box spored over SSH as ec2-user, which fails on Ubuntu AMIs (login user is ubuntu), so the extension is not applied and the box still self-terminates at the original TTL.

Repro (Ubuntu 24.04 arm64 AMI, launched with --ttl 45m):

spawn extend <name> 45m --profile <p>
# ⚠️  Warning: Failed to trigger reload: exit status 255: ec2-user@<ip>: Permission denied (publickey).
#    You may need to manually run: ssh ec2-user@<ip> 'sudo spored reload'

The workaround is to reload as the real login user:

spawn connect <name> --user ubuntu --profile <p> -- sudo spored reload

Fix: the reload SSH should use the same login user spawn connect resolves (the AMI's default user / --user), not a hardcoded ec2-user. Impact: spawn extend silently no-ops on non-AL2023 AMIs — a box you believe you extended terminates mid-run.

(Found while benchmarking on Ubuntu boxes; a multi-instance run lost a box to this.)

Activity

  1. added 2 commits that reference this issue on Sep 9, 2026
    e02ae70
    7366db4
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

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions