SECTION 02 / INSTALLATION
Quick start
Install the binary, start the switchboard, and point SSH at the stable socket.
Install the current source
With Nix
nix profile install github:jwilger/lanyard-ssh-agentWith Cargo
cargo install --git https://github.com/jwilger/lanyard-ssh-agentCrates.io and prebuilt Linux archives will become available with the first release.
Capture an incoming forwarded agent
If this is an SSH session with agent forwarding, preserve its temporary socket before changing SSH_AUTH_SOCK:
forwarded_agent=${SSH_AUTH_SOCK-}Start the switchboard
lanyard-ssh-agent serve --upstream "$HOME/.1password/agent.sock"Run the foreground service in a dedicated terminal or under your service manager. It creates the agent socket and a sibling control socket beneath $XDG_RUNTIME_DIR/lanyard-ssh-agent/.
Register the forwarded agent
When $forwarded_agent is non-empty, register the value captured above:
lanyard-ssh-agent register "$forwarded_agent"Discovery also watches conventional OpenSSH temporary socket locations, while explicit registration makes the handoff unambiguous.
Point clients at Lanyard
export SSH_AUTH_SOCK="$XDG_RUNTIME_DIR/lanyard-ssh-agent/agent.sock"
# ~/.ssh/config
Host *
IdentityAgent $XDG_RUNTIME_DIR/lanyard-ssh-agent/agent.sockVerify the current source
ssh-add -L