Devices the crew may SSH to

A crew run's shell reaches the forge and the registry only, unless its repository lists a granted device.

  1. A repository admin lists one: POST /api/v1/repos/:owner/:name/crew-devices with {"device":"[email protected]:22","secret":"ARM_PI_SSH_KEY"}. Exact user@host:port, no range; the key is a secret at the repository's own scope.
  2. A site admin grants it: POST …/crew-devices/grant with {"device":"…"}. The forge reads the host key the device shows right then and pins it (or take host_key from the admin). A device is named by its IPv4 address: a name is refused (ssh would resolve it again at run time), and so is an IPv6 or mapped address.
  3. A run on that repository then has exactly that host:port in its sandbox, the key in a 0600 file, a pinned known_hosts and an ssh <alias> config, all in its own temp directory and removed at the run's end. The brief names the device and the rules (read and test freely, restart only what sudo allows, never change users, keys or network).
  4. GET …/crew-devices lists the devices and the sessions (crew.device.session events: who, when, arguments). The session note is the run's own report, not an audit; the device's logs are.

DELETE …/crew-devices (the device in the body) unlists; changing the secret drops the grant.

Both doors: Settings › Devices (src/web/pages/crew_devices.ts) and the terminal screen (src/tui/screens/crewdevices.ts, palette entry Devices in a repository you administer: a lists, g grants, x unlists, s flips to the sessions) use the same actions. A repository admin lists, unlists and reads; only a site admin grants; anyone else sees nothing. Each write is an event, so an open page or screen follows.

The ssh wrapper refuses a run's own -o, -F and -J so the pinned host key and the forwarding bans stand against ssh <alias>; but a run can still start the real ssh by its path, so the pin is not enforced against a hostile run. What bounds it is the sandbox: it reaches only that host:port. If nc is missing the device is not reachable and named so in the run's log.

Search
↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs