# What about background sessions and Tailscale?

> Cube Agent 2.4.1 Release (Build 2004105) User Guide.
> Category: Remote connections. Content baseline: 2026-12-05.
> Web page: https://cubeagent.app/en/docs/ssh_network/

## Leaving the Page & Switching to Background

Leaving the terminal page does not disconnect your session—you can tap **Resume terminal** from the server list at any time. Active terminals, running commands, and queued SFTP uploads or downloads continue operating when you switch to the background or turn off the screen with the help of system background-execution protection, displaying "Running a computing task" or "Transferring data" in the notification bar. Once all remote tasks finish and no other background jobs remain, the notification disappears automatically. The notification only indicates active status and never exposes commands, filenames, or output. To learn more about why this notification appears, see **"Why does the notification bar say "computing task" or "data transfer" in the background?"** in Help Center.

Please allow notifications for the app. Long idle periods, system battery-saving pauses, app termination, or network switches can still interrupt a connection, so the notification does not guarantee an unbroken connection indefinitely. If you manually dismiss it from the notification shade, it will not repeatedly pop back up during that background session.

Only tapping **Disconnect** in the title bar menu closes the local terminal connection. Disconnecting does not stop remote tasks, and reconnecting does not automatically replay previous commands. If the app indicates that a task status requires verification, check on the server or via another connection before releasing the lock.

## SSH / SFTP in the Browser

A connected and authenticated Web workbench can continue using standalone SSH/SFTP sessions, terminal input, and file transfers after the mobile client moves to the background, provided the local Web service and network remain available. Stopping the Web service, closing the session, or losing access authorization prevents further operations; if the system reclaims the app process, the service will also stop, so permanent background availability is not guaranteed.

The Web workbench does not share the manual native terminal, and host credentials and fingerprints remain managed inside the app. Native Cube Companion only tracks native remote entries and does not display Web sessions or Web transfers.

## Connecting via Tailscale

1. Join both your phone and the target machine to the same Tailscale network and verify both devices are online.
2. Run a standard SSH server on the target machine and allow your phone to reach the actual SSH port.
3. Turn on a system VPN on your phone that covers Cube Agent. If you use a native HarmonyOS client with per-app split tunneling, make sure Cube Agent is included.
4. In Cube Agent, add the target machine's Tailscale IP address (typically `100.x.x.x`), SSH port, server username, and password or private key, then verify the host fingerprint.

Add each machine individually. This setup uses standard SSH routed over the Tailscale network—Tailscale itself does not replace the target machine's SSH daemon or login credentials. Tailscale's built-in Tailscale SSH uses a separate authentication policy and should not be confused with standard SSH configuration.

## Common Connection Issues

- **Timeout**: Check your network, VPN coverage, Tailscale access rules (ACLs), and the server's firewall.
- **Connection refused**: Check whether the SSH service is running and whether the port number is correct.
- **Authentication failed**: Enter the credentials for the server's OS user account, not your Tailscale account.
- **Host key changed**: Verify the new fingerprint with your administrator before updating trust.

When connecting from a phone to an actual machine, do not reuse the emulator test gateway `10.0.2.2`.
