pre-legs: drive host holds no SSH private key — every droplet dial is publickey-denied #1422

Closed
opened 2026-09-12 05:59:24 +00:00 by matou-build-agent · 3 comments

The failure

Drive 20260912T053407Z (--target droplet) went red at pre-legs — before the journey opened. The droplet was rented fine; nothing on the drive host could then log into it. Every dial answered Permission denied (publickey), and the drive died inside oc_droplet_create's SSH-banner wait. So there is no artifacts/verdict.json, no artifacts/journey.json, no playwright report, and state/ is empty.

This is NOT the known pairing frontier. legs.json carries no skip reasons at all — only the reporter's synthesized fallback marker. The own-VPS carrier issue sits downstream of a leg this drive never reached, so it cannot be what is red here.

The live box refused me too — and not because it is dark. ssh root@170.64.176.63 'systemctl --failed' → Permission denied (publickey). This is not #414's no-sshd hardening: a fresh TCP connect to 170.64.176.63:22 succeeds right now and sshd answers as OpenSSH_9.6p1 Ubuntu-3ubuntu13.16. The refusal is authentication, not absence. Everything below is therefore from the harvested logs plus checks on the drive host itself.

The evidence

The only leg record is the fallback string — it names nothing:

[{"leg":"pre-legs","status":"red","ms":0,"error":"red before legs.json was written"}]

The box was never dark. logs/droplet-do-forensics.txt:

3 packets transmitted, 3 received, 0% packet loss, time 2003ms
tcp/22: a FRESH connect succeeded — the box answers, whatever ssh did
ID 3402464617  completed  create  2026-09-12 05:34:21 +0000 UTC  ...05:34:55 +0000 UTC

One create action and nothing else — no power-cycle, no resize, no migration. DO's own side is clean.

Every droplet-side harvest got the same single line. logs/droplet-journal.txt, and identically droplet-units.txt, droplet-caddy.txt, droplet-keri.txt, droplet-stall.txt:

root@170.64.176.63: Permission denied (publickey).
    note: droplet evidence gather failed (droplet unreachable?) — the run dir keeps the app-side story

Root cause, verified on the drive host just now: there is no private key to offer. ssh -v shows every candidate identity missing and the client running out of methods before it ever authenticates:

debug1: identity file /home/swarm/.ssh/id_ed25519 type -1
debug1: Authentications that can continue: publickey
debug1: No more authentication methods to try.
root@170.64.176.63: Permission denied (publickey).

~/.ssh holds only authorized_keys, known_hosts, known_hosts.old — no private key, no config. find /home/swarm -name 'id_*' -o -name '*.pem' returns nothing, and SSH_AUTH_SOCK is unset, so there is no agent either. The droplet path mints no per-run identity (that belongs to the rented path) — it relies entirely on the operator's ambient key being authorised into root by clan-lab create. This host has the private half of none of them, so no droplet drive on this host can reach its own box: wizard, takeover, evidence harvest and cert harvest all dial the same way and all fail the same way.

Suspected layer

Infra / host credential state, outside this checkout. The operator SSH identity is missing on the drive host. Two real harness defects sit beside it and made this red near-illegible, but neither caused it — both verified live against HEAD b983114e:

  1. scripts/lib/rehearsal-droplet.sh:545-547 — the banner probe swallows ssh's stderr, so the cause is discarded and the ceiling misattributes it:

    until ssh -o StrictHostKeyChecking=accept-new -o BatchMode=yes -o ConnectTimeout=5 \
          "root@$OC_E2E_DROPLET_IP" true 2>/dev/null; do
      (( SECONDS < ssh_timeout )) || die_host "... the droplet never presented its banner (still booting, or unreachable) ..."
    

    The box did present its banner and did answer — flatly contradicted by the run's own tcp/22: a FRESH connect succeeded. An auth refusal is an identity fault; it will never clear by waiting, so burning the 300s ceiling on it is wrong. The sibling member-device wait at :1575-1578 has the identical swallow.

  2. .sandcastle/rehearsal-report.sh:543 — the pre-legs synthesis greps the log tail for Error|error|FAIL|timed out. Replayed against this run's logs it matches nothing (grep exit 1), which is why legs.json got the useless fallback even though all five droplet-*.txt files held the cause verbatim. Permission denied is outside the pattern.

A healer ran on this drive and claims a fix for (1) in commit 5057a6ea. That commit does not exist in this checkout (git cat-file -t → could not get object info; HEAD is 4c79ddcd..b983114e) and :546 still reads 2>/dev/null. Treat (1) as live. That healer also could not finish — logs/healer-claude.out shows Claude auth refused on this same host, the same class of missing host credential, so one fix may clear both.

What plugging it needs

  • The red itself — needs a human. Place a private key on the drive host (or expose one via ssh-agent) whose public half is registered on the DO account, then re-drive. Nothing under scripts/ changes for this; secrets and infra state are not agent-fixable.
  • Agent-actionable beside it. Keep ssh's stderr in both banner waits (2>&1 >/dev/null), classify Permission denied (publickey) as an identity fault that fails fast instead of waiting out the ceiling, and carry ssh's line verbatim into the die message. Widen the rehearsal-report.sh:543 pattern (add [Pp]ermission denied, case-insensitive fail) so a pre-legs red keys on its real cause.
  • Housekeeping. Droplet 599832331 / clan-lab-rehearsal-970590aa (syd1, s-2vcpu-4gb) was deliberately kept on red and is still up and billing — no destroy in the action list. Confirm the hourly scripts/clan-lab-reap.sh takes it.

What's absent

artifacts/verdict.json, artifacts/journey.json, any playwright report, and all droplet-side content — the five droplet-*.txt files exist but hold only the refusal line. state/ is empty. Present and useful: legs.json (marker only), droplet-do-forensics.txt, healer-claude.out, claude-env.txt.

drive 20260912T053407Z red at pre-legs: red before legs.json was written
evidence: /home/swarm/session-runner/idss/test-results/drive-droplet/20260912T053407Z on matou-workstation (legs.json and whatever else the drive harvested there) — a representative screenshot is attached here if one was captured

## The failure Drive `20260912T053407Z` (`--target droplet`) went red at **`pre-legs`** — before the journey opened. The droplet was rented fine; nothing on the drive host could then log into it. Every dial answered `Permission denied (publickey)`, and the drive died inside `oc_droplet_create`'s SSH-banner wait. So there is **no** `artifacts/verdict.json`, **no** `artifacts/journey.json`, no playwright report, and `state/` is empty. **This is NOT the known pairing frontier.** `legs.json` carries no skip reasons at all — only the reporter's synthesized fallback marker. The own-VPS carrier issue sits downstream of a leg this drive never reached, so it cannot be what is red here. **The live box refused me too — and not because it is dark.** `ssh root@170.64.176.63 'systemctl --failed'` → `Permission denied (publickey).` This is *not* #414's no-sshd hardening: a fresh TCP connect to `170.64.176.63:22` succeeds right now and sshd answers as `OpenSSH_9.6p1 Ubuntu-3ubuntu13.16`. The refusal is authentication, not absence. Everything below is therefore from the harvested logs plus checks on the drive host itself. ## The evidence The only leg record is the fallback string — it names nothing: ```json [{"leg":"pre-legs","status":"red","ms":0,"error":"red before legs.json was written"}] ``` The box was never dark. `logs/droplet-do-forensics.txt`: ``` 3 packets transmitted, 3 received, 0% packet loss, time 2003ms tcp/22: a FRESH connect succeeded — the box answers, whatever ssh did ID 3402464617 completed create 2026-09-12 05:34:21 +0000 UTC ...05:34:55 +0000 UTC ``` One `create` action and nothing else — no power-cycle, no resize, no migration. DO's own side is clean. Every droplet-side harvest got the same single line. `logs/droplet-journal.txt`, and identically `droplet-units.txt`, `droplet-caddy.txt`, `droplet-keri.txt`, `droplet-stall.txt`: ``` root@170.64.176.63: Permission denied (publickey). note: droplet evidence gather failed (droplet unreachable?) — the run dir keeps the app-side story ``` **Root cause, verified on the drive host just now:** there is no private key to offer. `ssh -v` shows every candidate identity missing and the client running out of methods before it ever authenticates: ``` debug1: identity file /home/swarm/.ssh/id_ed25519 type -1 debug1: Authentications that can continue: publickey debug1: No more authentication methods to try. root@170.64.176.63: Permission denied (publickey). ``` `~/.ssh` holds only `authorized_keys`, `known_hosts`, `known_hosts.old` — no private key, no `config`. `find /home/swarm -name 'id_*' -o -name '*.pem'` returns nothing, and `SSH_AUTH_SOCK` is unset, so there is no agent either. The droplet path mints no per-run identity (that belongs to the *rented* path) — it relies entirely on the operator's ambient key being authorised into root by `clan-lab create`. This host has the private half of none of them, so no droplet drive on this host can reach its own box: wizard, takeover, evidence harvest and cert harvest all dial the same way and all fail the same way. ## Suspected layer **Infra / host credential state, outside this checkout.** The operator SSH identity is missing on the drive host. Two real *harness* defects sit beside it and made this red near-illegible, but neither caused it — both verified live against HEAD `b983114e`: 1. `scripts/lib/rehearsal-droplet.sh:545-547` — the banner probe swallows ssh's stderr, so the cause is discarded and the ceiling misattributes it: ```bash until ssh -o StrictHostKeyChecking=accept-new -o BatchMode=yes -o ConnectTimeout=5 \ "root@$OC_E2E_DROPLET_IP" true 2>/dev/null; do (( SECONDS < ssh_timeout )) || die_host "... the droplet never presented its banner (still booting, or unreachable) ..." ``` The box *did* present its banner and *did* answer — flatly contradicted by the run's own `tcp/22: a FRESH connect succeeded`. An auth refusal is an identity fault; it will never clear by waiting, so burning the 300s ceiling on it is wrong. The sibling member-device wait at `:1575-1578` has the identical swallow. 2. `.sandcastle/rehearsal-report.sh:543` — the pre-legs synthesis greps the log tail for `Error|error|FAIL|timed out`. Replayed against this run's logs it matches **nothing** (`grep` exit 1), which is why `legs.json` got the useless fallback even though all five `droplet-*.txt` files held the cause verbatim. `Permission denied` is outside the pattern. A healer ran on this drive and claims a fix for (1) in commit `5057a6ea`. **That commit does not exist in this checkout** (`git cat-file -t` → `could not get object info`; HEAD is `4c79ddcd`..`b983114e`) and `:546` still reads `2>/dev/null`. Treat (1) as live. That healer also could not finish — `logs/healer-claude.out` shows Claude auth refused on this same host, the same class of missing host credential, so one fix may clear both. ## What plugging it needs - **The red itself — needs a human.** Place a private key on the drive host (or expose one via ssh-agent) whose public half is registered on the DO account, then re-drive. Nothing under `scripts/` changes for this; secrets and infra state are not agent-fixable. - **Agent-actionable beside it.** Keep ssh's stderr in both banner waits (`2>&1 >/dev/null`), classify `Permission denied (publickey)` as an identity fault that fails fast instead of waiting out the ceiling, and carry ssh's line verbatim into the die message. Widen the `rehearsal-report.sh:543` pattern (add `[Pp]ermission denied`, case-insensitive `fail`) so a pre-legs red keys on its real cause. - **Housekeeping.** Droplet `599832331` / `clan-lab-rehearsal-970590aa` (syd1, `s-2vcpu-4gb`) was deliberately kept on red and is still up and billing — no `destroy` in the action list. Confirm the hourly `scripts/clan-lab-reap.sh` takes it. ## What's absent `artifacts/verdict.json`, `artifacts/journey.json`, any playwright report, and all droplet-side content — the five `droplet-*.txt` files exist but hold only the refusal line. `state/` is empty. Present and useful: `legs.json` (marker only), `droplet-do-forensics.txt`, `healer-claude.out`, `claude-env.txt`. drive `20260912T053407Z` red at `pre-legs`: `red before legs.json was written` evidence: `/home/swarm/session-runner/idss/test-results/drive-droplet/20260912T053407Z` on matou-workstation (legs.json and whatever else the drive harvested there) — a representative screenshot is attached here if one was captured <!-- rehearsal-sig: 4e7f80c6bccc -->
Author
Member

Session ruling under ADR 0174 — veto anytime. Worked as one ready-for-session ticket on matou-workstation.

What landed (two-way, product-owned) — commit 75ef28ee

The drive's near-illegibility is fixed at the source. The banner wait now tells an auth refusal apart from a boot race:

  • New shared oc_ssh_banner_wait <ip> <timeout> <what> in scripts/lib/rehearsal-droplet.sh, used by BOTH the droplet (:545) and member-device (:1575) banner waits. It keeps ssh's stderr (out="$(ssh … 2>&1 >/dev/null)", never the old 2>/dev/null swallow), and on Permission denied fails fast on the first probe — carrying ssh's own line into the die_host message as an IDENTITY fault, with the remedy (place the operator's key on the drive host / ssh-agent, then re-drive) — instead of retrying the 300s ceiling and then mislabelling it "never presented its banner". Only connect-refused / timed-out waits out the ceiling.
  • Proof (red-before-green, offline): scripts/tests/droplet-banner-wait-test.sh — an auth refusal dies on the FIRST probe (never the ceiling) carrying ssh's line + "identity fault" and never "never presented its banner"; a connection-refused with a 0s ceiling still times out with the banner message; a slow-booting box that answers on the 2nd probe succeeds. Reverting the lib made the suite red (function undefined + the fast-fail assertion); restoring it greens. Adjacent droplet-evidence-order, device-evidence-order, rehearsal-{device,rented,vm-mode}-target suites all green; bash -n clean. GOTCHAS #228 records the hazard.

Reporter-side half → follow-up #1426 (not landed here)

The other agent-actionable item — widening the reporter's pre-legs synthesis grep so Permission denied keys the leg on its real cause — lives in .sandcastle/rehearsal-report.sh, a Matou/dev-factory-vendored file. The pre-push drift gate refuses a direct edit; it must land upstream + be re-vendored, and the factory has drifted several unrelated commits ahead of the pin, so I kept it out of this commit and filed #1426 with the exact patch + done-when. Ruled by agent under ADR 0174 — veto anytime.

Housekeeping — confirmed, no action needed

The kept-red droplet 599832331 / clan-lab-rehearsal-970590aa (syd1, s-2vcpu-4gb) is still active, but it carries the standard clan-lab-expires-1789212858 tag — expiry 2026-09-12 11:34:18Z. The proven hourly reaper (scripts/clan-lab-reap.sh, cron 17 * * * *, 10/10 tests) takes it at 12:17Z. Per the codebase's own rule ("a wedged drive dies by reap, never by hand"), I did not hand-destroy it. No leak.

Why human

The RED itself is a one-way door (ADR 0174 §3 — personal credentials / infra state), so this ticket is being relabelled ready-for-human, not closed:

The drive host (matou-workstation, /home/swarm/session-runner/idss) holds no SSH private key. ~/.ssh has only authorized_keys/known_hosts; find turns up no id_*/*.pem, and SSH_AUTH_SOCK is unset. The droplet path mints no per-run identity — it relies on the operator's ambient key being authorised into root by clan-lab create, and this host has the private half of none. Every droplet dial (wizard, takeover, evidence, cert harvest) is therefore Permission denied (publickey).

Human step: place a private key on the drive host (or expose one via ssh-agent) whose public half is registered on the DO account, then re-drive. Nothing under scripts/ reaches this — it is host credential state. (The healer that ran on this drive hit the same class of missing host credential — logs/healer-claude.out shows Claude auth refused on this host — so a single credential-provisioning pass may clear both.)

Confirmed live during this session: doctl compute droplet get 599832331 succeeds (DO token IS present on the host), but ssh root@170.64.176.63 is still Permission denied (publickey) and a fresh TCP connect to :22 answers as OpenSSH_9.6p1 — i.e. the box is up; only the SSH identity is missing.

Advances #1422.

**Session ruling under ADR 0174 — veto anytime.** Worked as one `ready-for-session` ticket on matou-workstation. ### What landed (two-way, product-owned) — commit `75ef28ee` The drive's near-illegibility is fixed at the source. The banner wait now tells an **auth refusal** apart from a **boot race**: - New shared `oc_ssh_banner_wait <ip> <timeout> <what>` in `scripts/lib/rehearsal-droplet.sh`, used by BOTH the droplet (`:545`) and member-device (`:1575`) banner waits. It **keeps ssh's stderr** (`out="$(ssh … 2>&1 >/dev/null)"`, never the old `2>/dev/null` swallow), and on `Permission denied` **fails fast on the first probe** — carrying ssh's own line into the `die_host` message as an IDENTITY fault, with the remedy (place the operator's key on the drive host / ssh-agent, then re-drive) — instead of retrying the 300s ceiling and then mislabelling it "never presented its banner". Only connect-refused / timed-out waits out the ceiling. - **Proof (red-before-green, offline):** `scripts/tests/droplet-banner-wait-test.sh` — an auth refusal dies on the FIRST probe (never the ceiling) carrying ssh's line + "identity fault" and never "never presented its banner"; a connection-refused with a 0s ceiling still times out with the banner message; a slow-booting box that answers on the 2nd probe succeeds. Reverting the lib made the suite red (function undefined + the fast-fail assertion); restoring it greens. Adjacent `droplet-evidence-order`, `device-evidence-order`, `rehearsal-{device,rented,vm-mode}-target` suites all green; `bash -n` clean. GOTCHAS #228 records the hazard. ### Reporter-side half → follow-up #1426 (not landed here) The other agent-actionable item — widening the reporter's pre-legs synthesis grep so `Permission denied` keys the leg on its real cause — lives in `.sandcastle/rehearsal-report.sh`, a **`Matou/dev-factory`-vendored** file. The pre-push **drift gate refuses a direct edit**; it must land upstream + be re-vendored, and the factory has drifted several unrelated commits ahead of the pin, so I kept it out of this commit and filed **#1426** with the exact patch + done-when. **Ruled by agent under ADR 0174 — veto anytime.** ### Housekeeping — confirmed, no action needed The kept-red droplet `599832331` / `clan-lab-rehearsal-970590aa` (syd1, s-2vcpu-4gb) is still `active`, but it carries the standard `clan-lab-expires-1789212858` tag — **expiry 2026-09-12 11:34:18Z**. The proven hourly reaper (`scripts/clan-lab-reap.sh`, cron `17 * * * *`, 10/10 tests) takes it at **12:17Z**. Per the codebase's own rule ("a wedged drive dies by reap, never by hand"), I did **not** hand-destroy it. No leak. ## Why human The RED itself is a **one-way door** (ADR 0174 §3 — personal credentials / infra state), so this ticket is being relabelled `ready-for-human`, not closed: > The drive host (matou-workstation, `/home/swarm/session-runner/idss`) holds **no SSH private key**. `~/.ssh` has only `authorized_keys`/`known_hosts`; `find` turns up no `id_*`/`*.pem`, and `SSH_AUTH_SOCK` is unset. The droplet path mints no per-run identity — it relies on the **operator's ambient key** being authorised into root by `clan-lab create`, and this host has the private half of none. Every droplet dial (wizard, takeover, evidence, cert harvest) is therefore `Permission denied (publickey)`. > > **Human step:** place a private key on the drive host (or expose one via ssh-agent) whose public half is registered on the DO account, then re-drive. Nothing under `scripts/` reaches this — it is host credential state. (The healer that ran on this drive hit the same class of missing host credential — `logs/healer-claude.out` shows Claude auth refused on this host — so a single credential-provisioning pass may clear both.) Confirmed live during this session: `doctl compute droplet get 599832331` succeeds (DO token IS present on the host), but `ssh root@170.64.176.63` is still `Permission denied (publickey)` and a fresh TCP connect to `:22` answers as `OpenSSH_9.6p1` — i.e. the box is up; only the SSH identity is missing. Advances #1422.
Owner

Session check 2026-09-14 (Ben's sitting) — the host attribution in this ticket is wrong, and the key is NOT missing on either swarm host.

Verified from the laptop, read-only:

  • matou-workstation (dev@134.199.154.244) has no swarm user at all (sudo: unknown user swarm); its runner is dev, whose ~/.ssh/id_ed25519 (MD5 6a:22:c4:db:…) is registered on the DO account as matou-workstation (id 58380188). Its sandcastle container runs as agent with no .ssh — a session that ran find /home/swarm … from inside it would find nothing because the directory does not exist there.
  • elitebook-03 (swarm@100.98.240.186) — the host that actually holds /home/swarm/session-runner/idss — has ~/.ssh/id_ed25519 since 2026-08-22 (MD5 37:61:c4:51:…), registered as elitebook-03 (id 58688162). Its droplet drives dial fine: 20260912T045221Z 26/27 green, 20260912T144514Z 20/21, 20260912T160919Z 19/20 (reds elsewhere — config_eval … the node was excluded, and the co-host leg's fleet-row click, being fixed now).
  • The third drive host, bens-mac-04 (mac-local), is off the network right now (no route), so it could not be checked — if drive 20260912T053407Z ran there, that is where a swarm user with no key would be.

So the human step is: on bens-mac-04, as the user that runs its session-runner, ssh-keygen -t ed25519 -N '' -f ~/.ssh/id_ed25519 && doctl compute ssh-key import bens-mac-04 --public-key-file ~/.ssh/id_ed25519.pub — IF that host drove 20260912T053407Z. The drive's run dir is not on the workstation or elitebook (find … -name '*20260912T053407Z*' empty on both). Leaving ready-for-human until the mac is reachable and its run dir confirms it.

**Session check 2026-09-14 (Ben's sitting) — the host attribution in this ticket is wrong, and the key is NOT missing on either swarm host.** Verified from the laptop, read-only: - `matou-workstation` (`dev@134.199.154.244`) has **no `swarm` user at all** (`sudo: unknown user swarm`); its runner is `dev`, whose `~/.ssh/id_ed25519` (MD5 `6a:22:c4:db:…`) is registered on the DO account as `matou-workstation` (id 58380188). Its sandcastle container runs as `agent` with no `.ssh` — a session that ran `find /home/swarm …` from inside it would find nothing because the directory does not exist there. - `elitebook-03` (`swarm@100.98.240.186`) — the host that actually holds `/home/swarm/session-runner/idss` — has `~/.ssh/id_ed25519` since 2026-08-22 (MD5 `37:61:c4:51:…`), registered as `elitebook-03` (id 58688162). Its droplet drives dial fine: `20260912T045221Z` 26/27 green, `20260912T144514Z` 20/21, `20260912T160919Z` 19/20 (reds elsewhere — `config_eval … the node was excluded`, and the co-host leg's fleet-row click, being fixed now). - The third drive host, `bens-mac-04` (`mac-local`), is off the network right now (no route), so it could not be checked — if drive `20260912T053407Z` ran there, that is where a `swarm` user with no key would be. **So the human step is:** on `bens-mac-04`, as the user that runs its session-runner, `ssh-keygen -t ed25519 -N '' -f ~/.ssh/id_ed25519 && doctl compute ssh-key import bens-mac-04 --public-key-file ~/.ssh/id_ed25519.pub` — IF that host drove `20260912T053407Z`. The drive's run dir is not on the workstation or elitebook (`find … -name '*20260912T053407Z*'` empty on both). Leaving `ready-for-human` until the mac is reachable and its run dir confirms it.
Owner

Closed 2026-10-21 (Ben's stale sweep): Ben's 2026-09-14 session check found the premise wrong — the host attribution was mistaken and the SSH key is present and registered on both swarm hosts; droplet drives dial fine.

Closed 2026-10-21 (Ben's stale sweep): Ben's 2026-09-14 session check found the premise wrong — the host attribution was mistaken and the SSH key is present and registered on both swarm hosts; droplet drives dial fine.
ben 2026-10-21 14:17:05 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Matou/idss#1422
No description provided.