Skip to content

docs(skill): clarify sudo keyring key is per-host, not always master#8

Merged
jamiesun merged 1 commit into
mainfrom
docs/skill-sudo-password-key
Jun 12, 2026
Merged

docs(skill): clarify sudo keyring key is per-host, not always master#8
jamiesun merged 1 commit into
mainfrom
docs/skill-sudo-password-key

Conversation

@jamiesun

Copy link
Copy Markdown
Contributor

Problem

In skills/sshx/SKILL.md, the sudo with auto-filled password section implied the sudo password always lives under the master keyring key (with an example commented # Uses keyring entry "master"). An agent reading this concludes every host's sudo password is under master, and then fails on any host whose secret is stored under a different key.

Reality (verified in code)

The sudo keyring key is resolved per invocation:

  1. -pk= / --password-key= (highest) — config.go
  2. SSH_SUDO_KEY env var — config.go
  3. The named host's own password_key from settings.json, applied automatically when addressing the host by name — app.go:300
  4. master — last-resort fallback only — sshclient/client.go:26

So master is not universal; named hosts auto-use their own key.

Fix (docs only)

  • Rewrote the section to state the precedence explicitly and tell the agent: don't assume master; named hosts auto-resolve their key, pass -pk=<key> for ad-hoc IPs, and verify with --host-list / --password-check.
  • Reinforced the same point in the agent checklist.
  • CHANGELOG ### Documentation note.

No code changes.

The "sudo with auto-filled password" section implied the sudo password
always lives under the `master` keyring key, so an agent reading the skill
would assume every host uses `master` and fail on hosts whose secret is
stored elsewhere.

Document the real resolution order (-pk / SSH_SUDO_KEY / per-host
password_key from settings.json / master fallback), state explicitly that
named hosts auto-resolve their own key, and tell the agent to pass -pk=
for ad-hoc IPs and verify with --host-list / --password-check. Reinforce
the same point in the agent checklist.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@jamiesun jamiesun merged commit 14a7d21 into main Jun 12, 2026
6 checks passed
@jamiesun jamiesun deleted the docs/skill-sudo-password-key branch June 12, 2026 16:38
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.

1 participant