Skip to main content

Remote SSH to an onboard computer

An Administrator can open a shell on a drone's Jetson from anywhere the Jetson is online, over LTE, Starlink, Wi-Fi or Ethernet, without opening a port on the vehicle. The shell travels through the vehicle's own Cloudflare Named Tunnel, the one that already carries telemetry and video.

Two checks stand in front of it:

  1. Cloudflare Access decides who may open the route at all. One self-hosted Access application covers ssh-*.sabrobotix.com, so every vehicle is protected by the same policy.
  2. The Jetson's sshd still asks for the SSH key of the sabrobotix account. Access is not a replacement for it.

Remote SSH is full control of the onboard computer. Use it only with the drone on the ground and disarmed, like any other operation on a vehicle.

How it is wired​

  • Each vehicle's SSH hostname is ssh-<gateway id>.sabrobotix.com (ssh-sr00021.sabrobotix.com), one level below the zone so the Universal certificate covers it.
  • Publishing adds an ingress rule ssh-<gateway id>.sabrobotix.com → ssh://localhost:22 to the vehicle tunnel and a proxied CNAME to the tunnel, keeping the gateway rule and the catch-all. Withdrawing removes both. The state is read back from the tunnel's configuration rather than a separate database flag.
  • It is per drone and off by default. The Setup tab of the drone page shows a Remote SSH card to Administrators only; the API is GET/PUT /api/drones/<id>/ssh-access with { "enabled": true|false }.
  • Switching the drone's remote access off withdraws SSH with it, and SSH cannot be published while remote access is off.
  • The Suite publishes nothing until VEHICLE_SSH_ACCESS_APP on the Node service is set to exactly ssh-*.sabrobotix.com. The variable is the statement that the Access application exists: an SSH route without Access in front of it would let anyone with cloudflared reach the vehicle's sshd.

One-time setup: the Access application​

Done once for the account, in the Cloudflare dashboard under Zero Trust → Access → Applications:

  1. Add an application → Self-hosted.
  2. Name: Sabrobotix vehicle SSH. Destination: subdomain ssh-*, domain sabrobotix.com.
  3. Session duration: 8 hours or less.
  4. Policy Allow — include the Administrators by e-mail (or, later, by a group from an identity provider). Do not add an "Everyone" rule.
  5. Login method: One-time PIN is enough to start.
  6. Optional: under the application's settings, enable browser rendering for SSH to get a terminal in the browser without cloudflared.
  7. Save, then set VEHICLE_SSH_ACCESS_APP to ssh-*.sabrobotix.com in the environment files of the test and production VMs (/etc/suite/suite.env) and release.

To undo: withdraw SSH from every drone, remove the variable, then delete the Access application.

Before publishing a vehicle​

On the Jetson, check that sshd accepts keys only:

sudo sshd -T | grep -E '^(passwordauthentication|kbdinteractiveauthentication|permitrootlogin) '

Expected: passwordauthentication no, kbdinteractiveauthentication no, permitrootlogin no. The vehicle's host key should be in the Suite's registry (it is recorded at enrolment); the card lists the fingerprints to compare on first connection.

Connecting​

Install cloudflared on your computer, then add the lines the card shows to ~/.ssh/config:

Host ssh-sr00021.sabrobotix.com
User sabrobotix
ProxyCommand cloudflared access ssh --hostname %h

and run ssh ssh-sr00021.sabrobotix.com. The first time, a browser opens to sign in to Cloudflare Access; afterwards the usual SSH key is asked for. The green dot beside the drone tells you whether the Jetson is online before you try.