Syntax
Options
Either
--box or --ip is required. If both are provided, the command exits with an error.
What Gets Installed
Installation Flow
- Resolve target - Looks up box IP from
--boxname or uses--ipdirectly - Verify SSH - Tests key-based authentication and settles which identity the rest of the command offers
- Show summary - Displays what will be installed and asks for confirmation
- Deploy - Runs the deployment script (up to 30 minutes for a fresh install)
- Store version - Writes the CLI version to
/etc/lager/versionon the box - Add to config - Optionally adds the box to your local
.lagerconfig
Examples
Passwordless sudo
Installation configures passwordlesssudo for the box login user. The CLI drives
the box over non-interactive SSH, where sudo has no terminal to prompt against,
so the grants have to be in place before provisioning can run.
Lager writes these files, and only these files, under /etc/sudoers.d/:
Each of the three files is regenerated in full on every run — that is what
keeps a box on the current grant shape. A grant added inside one of them is
lost the next time it is written, so each file opens with a header saying so.
Lager never reads, edits, or removes any other file in
/etc/sudoers.d/. If you
or a box-management platform need additional grants, put them in a separate file
there — for example /etc/sudoers.d/zz-local, which sorts after Lager’s files so
its rules win — and Lager will leave it alone, including during lager uninstall.
SSH Authentication
Install requires key-based SSH authentication. It offers~/.ssh/lager_box —
the key lager ssh-setup and lager install generate — explicitly, because
that is not a filename ssh tries on its own. If the box does not accept it,
install falls back to your own default identities, so a box you authorized with
ssh-copy-id works unchanged.
If neither authenticates, install stops and tells you to run:
PasswordAuthentication no never receives
the password, so the resulting “password failed” message described something
that had not happened.
For new hosts, the SSH host key is accepted automatically. If the host key has
changed since a previous connection, the command asks you to verify the change
manually before proceeding.
Install does not write to ~/.ssh/config. Earlier versions added a per-IP
Host block naming the key; that block was deleted whenever the file was
regenerated by another tool, and it disabled host-key verification for the box.
The identity is passed per command instead.
Notes
- Requires SSH client tools (
ssh,ssh-keygen) to be installed locally - The deployment script is bundled with the
lager-clipackage - After installation, verify connectivity with
lager hello --box <name> - Use
lager updateto deploy code updates to an already-installed box - Use
lager uninstallto remove Lager software from a box

