OriginRouter AppRemote environments

Remote environments

Remote environments are SSH hosts registered on a target CLI device. A running agent can execute commands on those hosts through device tools, change the session directory, and manage background jobs. Host credentials stay on the CLI device and are never handed to the agent, the App, or the account service.

Add a host

Open Remote environments in the workspace rail, confirm the selected CLI device at the top, and create a host:

  1. Enter a display name, host address, port, and login user.
  2. Select an authentication method: password, private key, or the system SSH agent.
  3. Set a default working directory if needed; agent commands start there.
  4. Use Test connection before saving to verify the address, credentials, and default directory.

Credentials submitted to the target CLI come back only as masked state; the App never reads or echoes a password or private key. The host list is unreadable and creation is disabled while the target device is offline.

Confirm the host fingerprint

The first connection to a host asks you to confirm its SSH fingerprint (SHA256). Confirm only after verifying that the fingerprint belongs to the expected host; the device stores the decision and does not ask again for that host.

A changed fingerprint means the host identity changed or a middlebox is interfering. Investigate before updating the record.

Edit, test, and delete

  • Test connection performs a real SSH handshake through the target CLI and returns the remote directory; do not assume a host works before a confirmed test.
  • Edit saves with the current revision. If the record changed elsewhere, the save returns a conflict; refresh and retry.
  • Delete removes the registration and stored credentials but does not stop processes still running on the remote host.

Each host record carries two device-level behavior switches:

  • Terminate remote processes on session close: request termination of processes a logical session started when it closes (on by default).
  • Allow background tasks: let the agent submit long commands as background jobs and read their output incrementally (on by default).

How agents use it

Managed agent sessions receive the remote_env_* device tools automatically. The typical sequence:

  1. remote_env_list lists the user-configured hosts; the agent selects one by its returned ID.
  2. remote_env_open opens a logical session and returns a handle and the initial directory.
  3. remote_env_exec runs a command; remote_env_chdir changes the session directory; long commands use runInBackground and are followed with remote_env_job_read / remote_env_job_kill.
  4. remote_env_close closes the session when the work is done.

Every call passes through the session's current permission and approval policy; high-impact operations still wait for confirmation. Shell state such as cd or exported variables does not persist between commands. When a command's outcome is unknown after a timeout or disconnect, the agent is instructed to inspect the host independently instead of replaying the command.

Boundaries

  • Commands travel from the target CLI device to the SSH host; the App presents only the operation request and a result summary.
  • Credentials stay in the CLI device's system credential store. Device tools can never retrieve a password or private key.
  • A remote environment is not file sync or workspace migration. Persistent state on the remote host remains your responsibility.

Was this page helpful?