Skip to content

Session timeout (idle-shell auto-logout) #22

Closed

Description

@scttfrdmn

Port the Go tool's --session-timeout — auto-logout of idle SSH shells on the instance. This is distinct from the idle-instance lifecycle spawn-ts already enforces (that stops/hibernates the box; this disconnects idle login sessions).

Go source

  • pkg/launcher/bootstrap.go:391-404 — sshd ClientAliveInterval/ClientAliveCountMax 3 + a readonly TMOUT in /etc/profile.d/.
  • cmd/launch_flags.go:235 (flag), pkg/aws/tags.go:226-227 (spawn:session-timeout).

Browser feasibility

Browser-native — pure tag + src/aws/userdata.ts bootstrap; no daemon dependency. Cleanest quick win.

Acceptance

  • LaunchInput/LaunchSpec gain sessionTimeout (Go-duration); buildLaunchTags writes spawn:session-timeout (default 30m, 0=disable).
  • buildLinuxBootstrap injects the sshd ClientAlive lines + /etc/profile.d/session-timeout.sh with readonly TMOUT=<seconds>.
  • Unit tests assert the tag value and the bootstrap block (mirror src/aws/userdata.test.ts).
  • CLI --session-timeout flag wired in src/cli/commands.ts; docs note.

Size: small.

Activity

  1. added
    area: aws
    on Jul 21, 2026
  2. added a commit that references this issue on Jul 21, 2026
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

    area: aws

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions