Lochan

Docs / Pair with Herdr

Pair Lochan with Herdr

One command on the host. One scan on the phone. Nothing to type.

Lochan talks to Herdr, the runtime your coding agents already live in. Pairing lets the phone open an SSH session to a Mac or Linux machine you own, so you can see those agents and type into them from anywhere. Your code and API keys stay on that machine. Herdr is a separate product, not part of Lochan.

What you need

If Herdr is not on the host yet:

curl -fsSL https://herdr.dev/install.sh | sh
  1. Run the pairing command

    On the Mac or Linux host, in a terminal:

    curl -fsSL lochan.app/herdr-setup | sh

    The script turns on Remote Login (macOS) or SSH (Linux) if it is off. Your password is needed once for that, and not at all if SSH is already running. It then shows a QR code and waits up to two minutes for the phone.

    Run one setup at a time. A second run on the same machine kills the first QR before you can scan it.

    If Tailscale is installed but not signed in, or not installed at all, the script says so before drawing the code. That code only reaches the machine from the same Wi-Fi until you run it again on a live tailnet.

  2. Scan from Lochan

    On the phone, open Lochan, then Herdr in the sidebar. Tap Scan pairing code on the Herdr tour's last page, or from Add Host. Point the camera at the QR on the host's screen.

    Scan from the Lochan app. A camera app only works if it opens the lochan:// link rather than saving a photo.

    The phone makes its own SSH key and keeps the private half in the Keychain. Only the public half is sent to the host. The QR also carries the host's SSH fingerprint, so you are not asked to compare it by hand. The code is single-use and lasts about two minutes.

    When it works, the host prints:

    Authorized key: 256 SHA256:… (ED25519) Done! You can now connect from your phone.
  3. Reach the host from anywhere

    The phone SSHes straight to that machine. There is no Lochan server in the middle. Away from home, both devices need a path to each other.

    Install Tailscale on the host and the phone, sign in, then run the pairing command again so the QR uses the MagicDNS name. After that, a blocked agent on your desk can be answered from cellular.

If you cannot scan

Add Host still has a manual form. Copy this phone's public key onto the host, or use Install key on host (Mac password once). Pairing again on a machine you already saved replaces that host's key instead of adding a duplicate.

Troubleshooting

What pairing stores

On the phone: the host address, username, the path to herdr, and this phone's private key in the Keychain. On the host: this phone's public key in ~/.ssh/authorized_keys. The throwaway pairing key is deleted when pairing finishes, times out, or you press Ctrl-C. Traffic goes only to the host you pair, not to Lochan and not to herdr.dev.

Lochan uses Herdr, the runtime coding agents run on. Herdr is not a Lochan product. See also Support and the Privacy Policy.