Skip to content

Commit f3c6698

Browse files
committed
feat(node): auto-bootstrap ssh during pair and add ssh setup command
1 parent e86268a commit f3c6698

6 files changed

Lines changed: 922 additions & 48 deletions

File tree

docs/cli.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -749,6 +749,7 @@ Subcommands:
749749
| --- | --- |
750750
| `init` | Initialize this host as a node and emit enrollment bundle |
751751
| `pair` | Pair node with one-command or expiring verification-code flow |
752+
| `ssh` | Manage SSH bootstrap for node pairing and remote runs |
752753
| `add` | Add a node from an enrollment bundle |
753754
| `list` | List registered nodes |
754755
| `status` | Probe node health and report live status |
@@ -787,6 +788,9 @@ hack node pair complete --session <pair-session-id> --bundle approved-bundle.jso
787788
# controller one-shot approve + complete for existing pending request
788789
hack node pair fulfill --session <pair-session-id> --code <one-time-code> --default
789790

791+
# repair/setup passwordless SSH explicitly (also run automatically by `hack node pair`)
792+
hack node ssh setup --source "remote-user@node-a.tailnet.ts.net"
793+
790794
# on controller
791795
hack node add --bundle ./node-bundle.json
792796
hack node list

docs/guides/remote-node-laptop-e2e.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,10 @@ Notes:
8282
- `/usr/local/bin/hack`
8383
- `/usr/bin/hack`
8484
- `PATH` fallback (`which hack`)
85-
2. If endpoint inference fails, pass `--endpoint` explicitly.
86-
3. If SSH username was wrong, retry with the correct user.
85+
2. `hack node pair` also auto-runs SSH bootstrap (managed key + `~/.ssh/config` host block) so remote runs can use non-interactive SSH.
86+
3. If you need to repair SSH independently, run `hack node ssh setup --source "<user@node-host>"`.
87+
4. If endpoint inference fails, pass `--endpoint` explicitly.
88+
5. If SSH username was wrong, retry with the correct user.
8789

8890
Validate:
8991

docs/guides/remote-node-quickstart.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,13 @@ hack node pair \
3434
--default
3535
```
3636

37+
`hack node pair` now auto-bootstraps passwordless SSH for the provided source.
38+
If you need to repair SSH outside pairing, run:
39+
40+
```bash
41+
hack node ssh setup --source "<user@remote-host>"
42+
```
43+
3744
Validate:
3845

3946
```bash

0 commit comments

Comments
 (0)