Add README example for --remote-ssh-config
All checks were successful
CI / test (push) Successful in 8m19s
Lint / test (push) Successful in 33s
Trivy / test (push) Successful in 25s

This commit is contained in:
Miguel Jacq 2026-01-13 22:03:58 +11:00
parent f5eaac9f75
commit 478b0e1b9d
Signed by: mig5
GPG key ID: 59B3F0C24135C6A9

View file

@ -74,7 +74,7 @@ Harvest state about a host and write a harvest bundle.
**Common flags** **Common flags**
- Remote harvesting: - Remote harvesting:
- `--remote-host`, `--remote-user`, `--remote-port` - `--remote-host`, `--remote-user`, `--remote-port`, `--remote-ssh-config`
- `--no-sudo` (if you don't want/need sudo) - `--no-sudo` (if you don't want/need sudo)
- Sensitive-data behaviour: - Sensitive-data behaviour:
- default: tries to avoid likely secrets - default: tries to avoid likely secrets
@ -355,6 +355,14 @@ enroll harvest --out /tmp/enroll-harvest
enroll harvest --remote-host myhost.example.com --remote-user myuser --out /tmp/enroll-harvest enroll harvest --remote-host myhost.example.com --remote-user myuser --out /tmp/enroll-harvest
``` ```
### Remote harvest over SSH, where the SSH configuration is in ~/.ssh/config (e.g a different SSH key)
Note: you must still pass `--remote-host`, but in this case, its value can be the 'Host' alias of an entry in your `~/.ssh/config`.
```bash
enroll harvest --remote-host myhostalias --remote-ssh-config ~/.ssh/config --out /tmp/enroll-harvest
```
### Include paths (`--include-path`) ### Include paths (`--include-path`)
```bash ```bash
# Add a few dotfiles from /home (still secret-safe unless --dangerous) # Add a few dotfiles from /home (still secret-safe unless --dangerous)