Use Claude Code from another computer with hivemux
hivemux lets a second computer (say, a laptop) attach to the tmux of the Mac or Linux machine where your Claude Code sessions run, over ssh, with the same sidebar and sessions. Turn on Remote Login on a Mac, or run an ssh server on Linux, then on the laptop run hivemux connect --add me@work-mac.local once and hivemux connect me@work-mac.local to connect. If the connection drops, the work goes on.
How it works
Section titled “How it works”The work keeps running in one computer’s tmux. The other opens a new Ghostty window attached to it over ssh (or mosh). Local work on the laptop stays as it is; the remote one opens in its own window. hivemux needs to be installed on both.
Macs and Linux connect in either direction: Mac to Mac, Mac to Linux, Linux to Mac, Linux to Linux. Ports, hivemux open, Option+O, Ctrl+V image paste, notifications and the bee office work the same in every case.
On the Mac you connect to
Section titled “On the Mac you connect to”- Install hivemux (see Install).
- Turn on System Settings → General → Sharing → Remote Login.
- Keep it from sleeping when idle (System Settings → Energy). It cannot be reached while asleep.
hivemux doctor checks Remote Login and sleep in its remote section.
On a Linux machine you connect to
Section titled “On a Linux machine you connect to”A common case is a Linux dev server: Claude Code runs there, close to the code, and you work on it from your Mac.
- Install hivemux with
curl -fsSL https://hivemux.dev/install.sh | bash(see Install on Linux). It needs tmux 3.3 or newer: Ubuntu 24.04+, Debian 12+, Fedora or Arch. - Run an ssh server: install the
openssh-server(Debian, Ubuntu) oropensshpackage, thensudo systemctl enable --now ssh(orsshd).
hivemux doctor checks that the ssh server answers. A server with no desktop is fine: setup skips the Ghostty step there, and dev servers, files and the bee office open on the computer you connect from.
On the computer you connect from
Section titled “On the computer you connect from”hivemux connect --add me@work-mac.local # check and remember (--mosh to use mosh)hivemux connect me@work-mac.local # or: right-click → Connect to…, prefix Shift+HThe first time, --add (or “+ Add a host…” in the Connect to… list) asks you to trust the host and for your login password there once, then adds this computer’s ssh key there (making one if there is none), so later connections need no password. It also checks that hivemux is installed there. Keep hivemux up to date on both computers: when one side is too old for the other, the screen says so as you connect, with the computer to update and the command.
The host is anything ssh takes: a Host from ~/.ssh/config, user@address, or a device name on a VPN. On the same network name.local works. From outside, a VPN such as Tailscale on both computers is the simple way.
On a Linux desktop, the new connection window opens in Ghostty, or else in the desktop’s terminal (x-terminal-emulator).
While connected
Section titled “While connected”- The remote window shows
⇄ <name>at the right of the status line, before the clock: the name set in Settings → This computer’s name, else the Mac’s name or the Linux host name. - A dropped connection reconnects by itself: a box in the middle counts down to the next try (
Entertries now,Ctrl+Cstops).prefix ddetaches and closes the window. - Notifications from the remote tasks show on this computer.
- Two screens on the same project share it: switching windows on one moves the other.
- While a remote screen is attached, the sidebars keep still in every window (no spinners in the sidebar or the status line), because every animation frame would go over the network; a row under each sidebar’s head says
⇄ <Mac> attached · animation off.
Dev server ports
Section titled “Dev server ports”Dev servers started on the other computer (npm run dev in a remote pane, say) are forwarded to the same port on this computer’s localhost while connected. A server on 5173 there opens here at http://localhost:5173. A port already taken here goes to the next free one. On a Linux server without lsof, hivemux finds the ports with ss and /proc, including a background server that systemd took over.
Option+W (or right-click → Ports) lists them on either side. Enter opens one in the browser of the computer you connect from; Ctrl+Y copies the address.

On a phone
Section titled “On a phone”Press p on a port in the list to open it on the Wi-Fi of the computer you connect from too: the list shows its address there (http://192.168.x.x:5173) and a QR code to scan with a phone on the same network. p again closes it. The code needs qrencode; without it the list offers to install it (i).

From a terminal, or to turn forwarding off:
hivemux connect --portsHIVEMUX_PORTS=0 hivemux connect me@work-mac.localPaste images and open files
Section titled “Paste images and open files”![A screenshot on the MacBook’s clipboard pasted with Ctrl+V into a Claude running on the Mac Studio: it shows up as [Image #1], and Claude sees the pay button running out of the card and changes its width from 360px to 100%](/_astro/paste-poster-en.DtSJxJga_1gNh7n.webp)
Ctrl+Vin a remote Claude pane pastes the image on this computer’s clipboard (a screenshot taken here, say): it is copied over and shows up as[Image #1]. On a Linux laptop the image comes fromwl-paste(Wayland) orxclip(X11). Both computers need hivemux 0.1.26 or later.- Files too: copy a PDF (or any files) in Finder with
⌘Cand pressCtrl+Vin a remote Claude pane; they go over under their own names and their paths are pasted for Claude to read. Several at once, no folders, up to 100 MB in all; from 5 MB the status line there shows the progress (📎 report.pdf and 2 more… 45%). Both computers need hivemux 0.1.52 or later. hivemux open <file>in a remote pane copies the file to this computer and opens it with its default app, so a screenshot Claude made there shows up here. The 🐝 button there opens the bee office here. Both computers need hivemux 0.1.29 or later.- In the
Option+Opopup on a remote screen,Tab,EnterandCtrl+Fdo the same: the file is copied to this computer and opens here, not on the one you are not looking at. A folder cannot be opened this way; the popup says so, andCtrl+Ycopies its path.Ctrl+Yalso puts the path on this computer’s clipboard. - With VS Code or Cursor as the Open path editor,
Enterin theOption+Opopup opens the file on the computer you connect from over Remote-SSH instead (it needs the Remote - SSH extension there).
Use mosh
Section titled “Use mosh”With --mosh (or m in the Connect to… list), the session survives sleep and network changes by itself, but notifications do not pass through mosh; the list marks such a host “mosh · no notifications”. Both computers need mosh: brew install mosh on a Mac, the mosh package on Linux.
brew install mosh # macOSsudo apt-get install mosh # Ubuntu, DebianIf it stops at “Nothing received from server on UDP port”, allow incoming connections for mosh-server in the other computer’s firewall.
For other ways to reach Claude Code away from your desk, including the phone app, see Claude Code remote access.