Skip to main content
An SSH connection forwards a local port to a remote Mains backend. The backend can keep its default loopback bind.

Before you connect

Prepare the remote machine:
  • Install Mains Server, or enable remote access on its running desktop app.
  • Sign in to the agent providers on that machine.
  • Verify that your local SSH client can reach the host.
  • Have the backend’s owner token available for authentication.

Start the backend

On the remote host:
The default port is 8787. Use the same port in the connection form. A background service can keep the backend running independently of an interactive terminal:

Add the connection

Open Settings → Mains Connect, add a backend, and choose SSH tunnel. Enter a name, SSH host or ~/.ssh/config alias, remote port, and owner token. An optional remote command can start the backend when connecting. Select the saved backend to connect. Mains uses your system SSH configuration and tunnels traffic to the remote loopback address.

Where work happens

Repositories, file operations, terminal processes, and providers run on the remote backend. The desktop client does not copy its own provider login to the remote host.

If connection fails

Test SSH access in your terminal and confirm that the backend is listening on the selected port. Verify host-key acceptance, authentication, token, and compatible Mains versions. Disconnect through Mains Connect to return to the local backend.