feat(opencode-plugin): support pinned SSH host keys for noninteractive git sync - #50
Merged
Merged
Conversation
There was a problem hiding this comment.
All reported issues were addressed across 2 files
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
…e git sync Sandbox git transfers connect to ssh.app.daytona.io, and host verification previously depended entirely on ambient SSH configuration: on a machine that had never connected, the first sync stopped at an interactive trust-on-first- use prompt, which blocks CI and supervised agent runs and offers no way to verify the host key independently. Honor DAYTONA_SSH_KNOWN_HOSTS: when it names a known_hosts file containing the ssh.app.daytona.io host keys, sandbox git transfers run with that exact file and StrictHostKeyChecking=yes, scoped via GIT_SSH_COMMAND so SSH behavior for other remotes is untouched. Unset keeps current behavior. Fixes part of #46 Signed-off-by: Mislav Ivanda <mislavivanda454@gmail.com>
…d survive spaced paths Review follow-ups on the DAYTONA_SSH_KNOWN_HOSTS support: - Add GlobalKnownHostsFile=/dev/null so a matching entry in the system-wide /etc/ssh/ssh_known_hosts cannot satisfy verification; the configured file is now the only host-key database for sandbox transfers. - Double-quote the UserKnownHostsFile value for OpenSSH's config parser. The value crosses two parsers: shell quoting alone still let OpenSSH split a spaced path into multiple known_hosts files, which made verification fail against the real gateway (reproduced live); the quoted form passes. Paths containing a literal double quote are rejected with a clear error since OpenSSH's grammar cannot express them. - README: create the target directory before ssh-keyscan redirect. Verified against ssh.app.daytona.io: spaced-path known_hosts + the exact generated GIT_SSH_COMMAND passes host verification and proceeds to the auth layer. Signed-off-by: Mislav Ivanda <mislavivanda454@gmail.com>
mislavivanda
force-pushed
the
feat/opencode-plugin-ssh-known-hosts
branch
from
August 14, 2026 14:31
9f084f3 to
e94f4d9
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Part of #46 (item: first noninteractive git sync stops at SSH host verification for
ssh.app.daytona.io, with no trust path a supervisor can verify without TOFU).Host verification for sandbox git transfers previously relied entirely on ambient SSH config. On a machine that has never connected to
ssh.app.daytona.io, the first push/pull hits an interactive trust-on-first-use prompt — a hard stop for CI and supervised agent runs.Changes
HostGitManager: whenDAYTONA_SSH_KNOWN_HOSTSnames aknown_hostsfile, all sandbox git network operations (push/fetch/pull) run withGIT_SSH_COMMAND=ssh -o UserKnownHostsFile=<file> -o StrictHostKeyChecking=yes. Scoped to these git invocations only — SSH behavior for other remotes is untouched. Unset ⇒ behavior unchanged.GIT_SSH_COMMANDis parsed bysh); quoting round-trip verified for plain paths, spaces, and embedded quotes.ssh-keyscan) and out-of-band fingerprint verification (ssh-keygen -lf).Publishing official
ssh.app.daytona.iofingerprints in the Daytona docs would complete the story (out of scope for this repo).Testing
tsc --noEmitclean; build covered by CISummary by cubic
Pins SSH host verification for sandbox git transfers to enable noninteractive syncs. Previously the first connection prompted TOFU; now, when
DAYTONA_SSH_KNOWN_HOSTSpoints to aknown_hostsfile,push/fetch/pullrun withStrictHostKeyChecking=yespinned to that file (systemknown_hostsignored). Unset leaves behavior unchanged; other remotes are unaffected.Review and rollout
GIT_SSH_COMMANDonly inHostGitManagersandbox operations.UserKnownHostsFile="<file>",GlobalKnownHostsFile=/dev/null, andStrictHostKeyChecking=yes."in the path.ssh-keyscan) and verifying (ssh-keygen -lf) host keys; the configured file is the only host-key database for sandbox transfers.known_hostswithssh.app.daytona.iokeys and setDAYTONA_SSH_KNOWN_HOSTS. If the file is missing/incorrect or the path contains", sandbox git operations fail fast.Written for commit e94f4d9. Summary will update on new commits.