lager commands and
lager ssh work without a password. Run it once per box, enter the box password
when prompted, and subsequent commands authenticate with the key.
This wraps the ssh-keygen / ssh-copy-id dance into a single command, so a
Permission denied (publickey,password) error can be fixed without knowing the
key path or the ssh-copy-id incantation by hand.
Introduced in lager 0.27.1 as
lager authorize; renamed to
lager ssh-setup because the old name read like authentication once
lager login (gateway sign-in) arrived. The old spelling still works
with a deprecation warning.Syntax
Options
Usage
ssh-copy-id). After the key
is installed, no further password prompts appear for that box.
How It Works
- Resolves the box name to an IP and looks up its SSH user (see SSH username resolution).
- Generates the key pair
~/.ssh/lager_box(andlager_box.pub) if it does not already exist. - Skips early if already authorized — if key authentication already works for the box, it reports success and changes nothing (the command is idempotent).
- Copies the public key to the box with
ssh-copy-id(one password prompt). - Verifies that passwordless key authentication now works, reporting a clear error if it does not.
~/.ssh/lager_box. Because that filename is not one of SSH’s
default identities, lager ssh passes -i ~/.ssh/lager_box explicitly when the
key exists (since lager 0.28.1), so authorized boxes connect without a password.
Examples
Troubleshooting
If
ssh-copy-id is unavailable, append the public key to the box manually:

