Skip to content

fix(onboarding): make keyless SSH guide fetches work for agents (OPE-94) - #239

Open
aakarim wants to merge 1 commit into
mainfrom
fix/ope-94-keyless-skill-fetch
Open

aakarim wants to merge 1 commit into
mainfrom
fix/ope-94-keyless-skill-fetch

Conversation

@aakarim

@aakarim aakarim commented Nov 4, 2026

Copy link
Copy Markdown
Owner

Linear issue

Fixes OPE-94.

Diagnosis

OpenLore's keyless SSH path uses keyboard-interactive authentication with zero challenges, while retaining public-key authentication so keyed clients keep their identities. Agents that add BatchMode=yes disable keyboard-interactive, so a fresh keyless client cannot fetch setup even though a terminal client can. OpenSSH uses the first value for each option, so simply appending BatchMode=no after an agent-supplied BatchMode=yes does not fix it.

Fix

  • Use explicit ssh -o BatchMode=no -o KbdInteractiveAuthentication=yes … </dev/null commands in teach's setup/connection/guide handoffs and setup's follow-up guide fetches.
  • Explain keyless options and first-value precedence in the agents template, portable OpenLore access skill, and usage guide; tell agents not to prepend batch mode.
  • Preserve host-key verification, identity keys on authenticated servers, and stdin for piped writes. No authentication implementation changes, anonymous SSH none authentication, new HTTP endpoints, or permission-system changes.
  • Update the existing embedded/rendered instruction assertions for the new commands.

Verification

Commands ran in nix develop --command:

  • go test -race ./internal/skills ./pkg/shell/cmds ./assets -count=1 passed.
  • go test -race -short ./... passed repository-wide after updating the rendered teach-example assertion, which had expected the previous plain SSH command.
  • go vet ./... and go build ./... passed.
  • git diff --check passed.
  • Local real-server/OpenSSH reproduction with IdentityFile=none and IdentityAgent=none: BatchMode=yes exited 255 with Permission denied (publickey,keyboard-interactive); the documented explicit options and closed stdin exited 0 and returned the setup guide. Disabling keyboard-interactive also failed as expected.
  • Rebuilt the binary and verified keyless fetches of teach, setup, onboarding, deploy, agents, openlore-skill, and skills. Updated instructions were present and SSH target templates rendered correctly.
  • Extracted the setup-fetch command from the served teach document, localized only its target, and executed it: exit 0 and the correct setup guide.
  • Public-key control still authenticated using publickey with BatchMode=yes.
  • Used an isolated known-hosts file with strict verification. Temporary server stopped and validation files removed. No live production changes or Claude model runs. Docker integration suites and dashboard checks were not run; this is an instruction-only fix.

Selection

Selected by Linear creation date, oldest first. Older unresolved issues were skipped: OPE-65 lacks enough server evidence for its historical transport failure; OPE-74's comment confirms genuinely distinct on-disk files and needs a case/content policy decision; OPE-77 and OPE-88 are already In Progress; OPE-89 and OPE-91 are In Review with open PRs; OPE-90 deliberately implements literal heredocs and is awaiting a maintainer decision on changing that design.

Agent thread

Implemented in this scheduled Amp child thread.

Do not merge automatically.

Use explicit keyboard-interactive-compatible options for agent guide fetches, explain OpenSSH option precedence, and preserve host-key and identity-key checks.

Amp-Thread-ID: https://ampcode.com/threads/T-b58ef7fb-f69f-471f-8a0c-02453b35793c
Co-authored-by: Amp <amp@ampcode.com>
@linear-code

linear-code Bot commented Nov 4, 2026

Copy link
Copy Markdown

OPE-94

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues block the instruction-only SSH guidance changes and corresponding assertion updates.

No open issues 🎉

What changed in this PR

This instruction-only change addresses OPE-94 by making OpenLore’s keyless SSH guide-fetch commands compatible with agents that otherwise enable batch mode. Authentication implementation and permissions remain unchanged.

Changes:

  • Add explicit SSH options and closed stdin to setup, connection, and guide-fetch examples.
  • Explain option precedence while preserving host-key verification, identity keys, and stdin for piped writes.
  • Update embedded and rendered instruction assertions to match the revised commands.
File Description
pkg/​openlore/​skill_examples_test.go Update the rendered teach-command assertion.
internal/​skills/​skills_test.go Update the embedded setup-fetch assertion.
docs/​how-to/​usage.md Document keyless SSH options and safety constraints.
assets/​skills/​teach.md Revise connection checks and guide handoffs.
assets/​skills/​setup.md Revise onboarding and deployment guide fetches.
assets/​skills/​openlore/​SKILL.md Explain keyless access and read/write stdin handling.
assets/​skills/​agents.md Update skill installation and one-shot SSH guidance.

Review effort: Balanced

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants