vole
Site
Clone
Read only, no credentials:
https://rodent.software/vole.git
Write over SSH with a registered key:
git clone ssh://git@rodent.software/vole.git
Self-hosted forge that lives in your Git repo.
Ship an sshd drop-in for each platform instead of rendering one at runtime
883ffcc941bdeb32f0587cf0574b0cfbdcd33695 · Keenan Nemetz · 12d ago · parent a4a6d1e9
Ship an sshd drop-in for each platform instead of rendering one at runtime The drop-in was Linux-only prose: systemctl, useradd, /usr/lib/vole/ssh-shell, /usr/bin/vole, /etc/vole/vole.toml. The Match block works on macOS, but every operation around it differs — there is no sshd_config.d, reload is launchctl, accounts come from sysadminctl, and the binary and config live wherever the install put them. The only copy was rendered at build time from one fixed set of paths, so a Mac had nothing to install. Render two files from the same function instead: vole-linux.conf, which the package still installs as /usr/share/vole/sshd/vole.conf, and vole-darwin.conf, which the release publishes as vole-darwin-sshd.conf. The -update test rewrites both and compares both, and Linux sshd parses the macOS file too because the directives are identical and only the comments differ. Options gain the platform, the destination the Include line names, the account sshd runs AuthorizedKeysCommand as, the forced-command account's shell, and the socket path. The header branches on platform; the Match block does not. The macOS file names /usr/local paths and says so, with the one-line substitution a Homebrew prefix needs. check-deploy.py and nfpm.yaml follow the renamed Linux file; the package still installs it as vole.conf, so nothing on a Debian host changes. The front-door page gains the macOS steps, including that ssh_socket must be a directory both accounts can reach. Closes: 01M7ZVF5NWM5S9SV5AD00KFGC7
docs/deploy/index.md +36
| @@ -258,6 +258,42 @@ vole whoami --remote ssh://git@forge.example.com/demo.git | |||
| 258 | 258 | git clone ssh://git@forge.example.com/demo.git | |
| 259 | 259 | ``` | |
| 260 | 260 | ||
| 261 | ### On macOS | ||
| 262 | |||
| 263 | The `Match` block is the same; everything around it is not. The release attaches | ||
| 264 | the macOS drop-in as `vole-darwin-sshd.conf`, and the header names the macOS | ||
| 265 | steps: | ||
| 266 | |||
| 267 | ```sh | ||
| 268 | curl -fsSLO https://rodent.software/vole/channels/stable/vole-darwin-sshd.conf | ||
| 269 | sudo install -m 0644 vole-darwin-sshd.conf /etc/ssh/vole.conf | ||
| 270 | ``` | ||
| 271 | |||
| 272 | 1. Append `Include /etc/ssh/vole.conf` at the end of `/etc/ssh/sshd_config`. | ||
| 273 | |||
| 274 | 2. Check and reload sshd, with Remote Login on: | ||
| 275 | |||
| 276 | ```sh | ||
| 277 | sudo sshd -t && sudo launchctl kickstart -k system/com.openssh.sshd | ||
| 278 | sudo systemsetup -setremotelogin on | ||
| 279 | ``` | ||
| 280 | |||
| 281 | 3. Create the forced-command account with `sysadminctl`, giving it the shell the | ||
| 282 | drop-in names, and set the three settings in `vole.toml`. `ssh_socket` must | ||
| 283 | name a directory both the service account and that account can reach: there is | ||
| 284 | no `/run` and no tmpfiles on macOS. `vole serve` creates the directory if it is | ||
| 285 | missing, but not the group they share. | ||
| 286 | |||
| 287 | 4. Restart Vole the way you started it. | ||
| 288 | |||
| 289 | The drop-in names `/usr/local/bin/vole`, `/usr/local/etc/vole/vole.toml`, and | ||
| 290 | `/usr/local/lib/vole/ssh-shell`, the paths of a system install. A Homebrew | ||
| 291 | install uses the prefix `brew --prefix` prints (`/opt/homebrew` on Apple | ||
| 292 | Silicon), so change those paths to match. `AuthorizedKeysCommandUser` is the | ||
| 293 | account `vole serve` runs as. This release ships no launchd unit yet, so there is | ||
| 294 | nothing to start it for you; see | ||
| 295 | [Install on macOS](../install.md#install-on-macos). | ||
| 296 | |||
| 261 | 297 | `vole whoami` returning your account name means sshd resolved your key to it and | |
| 262 | 298 | the forced command reached the service. | |
| 263 | 299 | ||