Agent Access

Sometimes it's useful to let remote agents run commands on your local machine. Ocho lets you manage that access so well-behaved1 agents behave predictably and responsibly.

Personal Computers and Worker Machines

In your fleet, each machine is either a "personal computer" or "worker machine".

The computer on which you installed Ocho is a personal computer by default, and machines added through ocho machines add are worker machines by default. To change the role of a machine, run:

ocho machine edit laptop --agent-role personal
ocho machine edit studio --agent-role worker
ocho machines --fields name,agent_role,agent_access_effective

If you want to override a single machine, use ocho machine edit and add --agent-access ask, allow or block. If you want agents to be able to run commands on all machines, run ocho access policy unrestricted.

Handling Access Requests from Agents

When an agent needs to use a personal computer, it will first send an access request and then wait for your reply:

ocho access request laptop --reason "Build and test the iOS app"

The agent will show you the complete command required to approve the request, for example ocho access allow studio SESSION REQUEST, where studio is the agent's machine. You can also use ocho access to handle these requests yourself:

ocho access list                                       # every pending request
ocho access list MACHINE SESSION                       # requests from one session
ocho access allow MACHINE SESSION REQUEST              # until the session ends, or for 24 hours
ocho access always-allow MACHINE SESSION REQUEST       # any session on that machine, from now on
ocho access deny MACHINE SESSION REQUEST
ocho access revoke MACHINE SESSION REQUEST

Caveats

Operations that require your approval include ocho exec, the shell, and terminal panes. When an agent starts a session on another machine, it does not need to ask you.

A rule-abiding agent will ask for your consent before running commands. Ocho does not prevent agents from directly using the SSH configuration to access other machines. We are working on improving this and will have more information in future updates.