Repository navigation
Let Claude ssh to the Hosts from ~/.claude, for the user and root; make autocomplete (0.7.12) - #58
Merged
Merged
Conversation
…7.12) roster setup and sync now write the user's own ~/.claude: an import of ROSTER.md in CLAUDE.md, and in settings.json the allow rules for ssh, scp, rsync and roster ls/check/run, the ~/.ssh deny rules, and an autoMode.allow entry ($defaults kept) so auto mode lets the logins through. On each Mesh Host the login user gets the same (a missing ~/.claude is made), and so does root through sudo -n, since Claude often runs as root: root's settings, an import of the login's ROSTER.md, and an Include of its own copy of the Mesh config (ssh refuses a config file another user owns). Where sudo asks for a password, root is left out with one hint line. `claude: false` in roster.yml opts out and takes it all out again; setup --undo removes it too. The user's own keys and rules are kept (serde_json writes keys sorted). ROSTER.md says Claude may log in. Also `make autocomplete`: install the bash completion and source it from ~/.bashrc, once; `make uninstall` removes the line.
Merged
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What
roster setup/roster syncwrite the user's own~/.claude(opt out with top-levelclaude: falsein roster.yml):CLAUDE.md:@PATH/ROSTER.md, so Claude knows the Hosts from any directory.settings.json:permissions.allowforssh,scp,rsync,roster ls/check/run; the~/.sshdeny rules;autoMode.allowwith$defaultsplus a sentence authorizing logins to the Hosts in ROSTER.md (auto mode readsautoModeonly from user settings).~/.claudeis made); root too, throughsudo -n, because Claude often runs as root: root's settings, an import of the login's ROSTER.md, and anIncludeof root's own copy of the Mesh config (ssh refuses a config file owned by another user). Where sudo needs a password, root is left out with one hint line.claude: falseandsetup --undotake it all out again; the user's own keys and rules are kept. Keys come out sorted (serde_json withoutpreserve_order, which would add a crate outsidedeny.toml).make autocomplete: installs the bash completion and sources it from~/.bashrconce;make uninstallremoves the line.Tests
New: sync writes/keeps/removes the user's settings; Mesh
claude: falsekeeps root's and the user's own settings; no passwordless sudo gives one hint; undo removes root's part. A fakegetentkeeps tests out of the real/root. fmt, clippy, all 26 suites pass; line budget 4.8k/10k.Tried live on a 6-Host Mesh: root on one Host reaches another with
ssh NAME; existing settings kept.