Skip to main content

The four connection modes

Before you connect, the target machine must be hosting and both machines must be logged in. See Connect your first machine.

shell — interactive terminal

Open a full terminal on the remote machine.
You get a normal interactive prompt, running on the far machine, over an encrypted peer-to-peer link.

exec — run a command, capture the output

Run a single command, stream its output back, and exit with the remote command’s exit code. No terminal UI — perfect for scripts and AI agents.
Because exec returns the remote exit code, it composes with shell logic:

mosh — a terminal that roams

mosh gives you an interactive session that survives network changes — switch Wi-Fi, close the lid and reopen, change locations, and your session is still there.
vpncli starts the mosh server on the far machine for you (no ssh needed) and hands you the session. The remote machine needs mosh installed.

tunnel — forward a raw port

Forward a TCP (or UDP) port over the peer-to-peer link, so existing tools can ride vpncli.

copy files too

Not a terminal, but the same P2P link moves files with no server in the middle:

Next

Connect

Install, log in, and host your first machine.

Security

How every mode stays encrypted.