Linkdocs

Pair your phone

Scan a one-time QR code to give your phone its own key to this computer.

On Linux the installer starts pairing for you. To pair another phone later, or if you installed with --no-ssh, run:

link-host ssh setup

Run it as yourself, not with sudo: Link's SSH server runs as your account.

Setup turns on Link's SSH server for your account (port 2222, keys only) and prints a QR code with the computer's name, address and account.

In the Link app, tap + and Scan QR code, then point the camera at the terminal. The app checks the computer's key against the code before it sends anything, makes its own key, and connects.

No camera handy? Choose Import from Linux in the app and paste the link-ssh://pair?… code printed under the QR.

The terminal clears once the code is used and says Phone paired. The computer appears in the app's header; its agents, terminals, files and desktop are one tab away.

What the code allows

The code is a one-time key with three limits written into the SSH server's authorized_keys:

  • it can't open a shell, a terminal or a tunnel;
  • the only thing it can run is link-host ssh claim, which adds the phone's own public key, once;
  • the SSH server refuses it after 10 minutes.

The phone's private key is made on the phone and never leaves it. As soon as the phone claims the code, the code signs in nowhere, so a screenshot of an old code is harmless. To pair another phone, run link-host ssh setup again for a fresh code.

Manage paired phones

link-host devices
Paired phones:
  w24gnNwQ  Galaxy S22 Ultra    paired 2026-10-10 · last connected 17 h ago
  IEMN+WcQ  Galaxy S25 Ultra    paired 2026-10-06 · last connected 21 h ago

Remove one: link-host devices remove ID-or-NAME

The id is the start of the phone key's fingerprint. "Last connected" comes from the SSH server's log (journalctl --user -u link-sshd), so it only reaches back as far as your journal keeps.

To unpair a phone (a lost one, say):

link-host devices remove w24gnNwQ

This deletes its key and restarts Link's SSH server, which ends that phone's open sessions. Other phones reconnect by themselves.

Pairing the same computer again

If you pair a computer your phone already has (after reinstalling the app, for example), the app makes a new entry and offers to replace the older one. Replacing removes the old entry and what Link kept for it on the phone. The old key stays allowed on the computer until you remove it with link-host devices remove.

Choosing how the phone connects

By default the phone reaches the computer directly, finding it from any network through a public meeting point. Two options change that:

link-host ssh setup --relay wss://your-relay.workers.dev   # through your own relay
link-host ssh setup --rendezvous off                       # only at the address in the code

How the phone connects explains each mode, and Your own relay sets one up in a minute.

When the address is wrong

Setup picks the address of the computer's default route. If the phone should use another one (a hostname, a VPN address), pass it:

link-host ssh setup --host my-desktop.local

On this page