Syntax
Options
Arguments
Usage
Run a command on the box
With aCOMMAND, 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:- Resolves the Lager Box name to IP address
- Looks up the SSH username (default:
lagerdata) - Opens an interactive SSH session
Username Resolution
SSH usernames are resolved in order:- Username stored with box configuration (
lager boxes add --user) - Default username:
lagerdata
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 withlager 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 withexitor 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
--boxnot specified

