Skip to main content
Open an interactive SSH session to a Lagerbox, or run a single command on it and return.

Syntax

Options

Arguments


Usage

Run a command on the box

With a COMMAND, lager ssh behaves like ssh user@host <command>: it runs the command on the box, streams its output back, and exits with the command’s exit code — no interactive shell. This is handy for scripting and one-off checks.
Use -- to separate lager’s options from the remote command whenever the command contains its own dashed flags, so they aren’t parsed as lager options. The remote command’s exit code is propagated as lager ssh’s exit code, so it composes cleanly in scripts.

How It Works

The command:
  1. Resolves the Lager Box name to IP address
  2. Looks up the SSH username (default: lagerdata)
  3. Opens an interactive SSH session

Username Resolution

SSH usernames are resolved in order:
  1. Username stored with box configuration (lager boxes add --user)
  2. Default username: lagerdata
To use a different username for a Lager Box:

SSH Key Setup

For passwordless access, set up SSH keys:

Examples


Common Tasks via SSH

Each of these can be run as a one-liner with lager ssh --box <box> -- <command>, or interactively after lager ssh --box <box>.

Check Container Status

View Lager Box Version

Check Disk Space

View Firewall Status


Notes

  • With no COMMAND, opens a fully interactive shell session (exit with exit or Ctrl+D)
  • With a COMMAND, runs it on the box and exits with the command’s exit code
  • The session runs as a child process so Lager’s cleanup hooks still fire
  • Default Lager Box is used if --box not specified