Sesh Docs
sesh.codes
Guides › Add a machine
Docs › Guides

Add a machine

Run agents on another Mac or a Linux box, and pair your iPhone and iPad. The code and the agents stay on your machines; Sesh shows you the sessions everywhere.

About 5 minutes

Before you start

  • A shell on the other computer, over SSH or at its own keyboard. It can be a Mac, or Linux on Intel or ARM.
  • A way for your Mac to reach it: the same network, Tailscale, or another VPN.
  • git on that computer, and a way to push from it, like gh auth login or an SSH key.

Install Sesh on the computer

Run this on the other computer:

curl -fsSL https://github.com/hipstersmoothie/sesh-app/releases/latest/download/install.sh | sh

It installs seshd and sesh in ~/.local/bin, starts seshd as a service that comes back after a restart, and prints a pairing code.

On Linux, two more commands. loginctl enable-linger $USER keeps Sesh running after you log out. Installing bubblewrap (for example sudo apt install bubblewrap) lets Sesh sandbox Autonomous sessions.

Pair it with Sesh

The installer printed a pairing code. If it’s gone, run sesh pair on the computer for a new one:

$ sesh pair
Pairing code: 7KQ4-M2XD (works once, for 10 minutes)

If the window is big enough (47 columns by 25 rows; otherwise it says how big), it also draws a QR code. To pair a phone or tablet without a Mac, open Sesh on it, tap Add Machine, and scan the code.

Then, on your Mac:

  1. Open Settings › Machines and click Add Machine….
  2. Enter the computer’s Address, like mac-mini or 100.64.0.2. Leave Port at 4777.
  3. Enter the Pairing code, give it a Name if you like, and click Pair.

The computer shows up as Connected. Your iPhone and iPad get it too, over iCloud.

Encrypted and direct. Sesh talks to the computer over TLS, and pairing remembers its certificate, so nothing in between can pretend to be it. Nothing goes through a Sesh server.

Pair an iPhone or iPad

  1. On your Mac, open Settings › Machines, click Details… next to This Mac, then Pair iPhone or iPad….
  2. If Sesh says other devices can’t reach this Mac yet, click Allow Connections. Your sessions keep running.
  3. On your phone, open Sesh, tap Add Machine, and scan the code on your Mac.

The code works once. Click New Code for another. With iCloud on, the phone also gets every machine you’ve paired on your Mac, so you only do this once.

Away from home? Your phone needs a way to reach your machines when it isn’t on the same network. Tailscale is the easiest.

Start a session there

In New Session, choose the computer from the machine menu above the project. Projects in ~/code, ~/src, ~/Developer and similar folders show up on their own. Clone Repository… clones into ~/code on that computer.

Need to log in to something there? Choose File › New Terminal on and pick the computer.

Keep it running

  • Keep Awake While Agents Work stops the computer from sleeping mid-task. It’s on; find it in the machine’s ⋯ menu in Settings › Machines.
  • When a machine says Needs Update, click Update. Or run seshd update on the computer.
  • To unpair a device, run sesh clients on the machine, then sesh revoke with its ID. For this Mac, use Unpair… under Paired Devices in Details….

If something’s wrong

The machine says Offline. Check that your Mac can reach the address, and that seshd is running there. On Linux, did you run loginctl enable-linger $USER?

The pairing code doesn’t work. Each code works once, for 10 minutes. Run sesh pair for a new one.

Cloning a private repository fails. Clones use that computer’s git login, not your Mac’s. Open File › New Terminal on the computer and run gh auth login.