restic/vm-esh-nas: fix htpasswd-append example (single ssh, not piped pair)

This commit is contained in:
2026-04-21 01:27:42 -07:00
parent c94024d238
commit 101c4d3462
+10 -3
View File
@@ -49,11 +49,18 @@ ssh -t vm-esh-nas 'sudo apt update && sudo apt install -y restic'
If not already present from an earlier pass:
```bash
# Generate the bcrypt line locally (httpd:2.4-alpine throwaway container)
ssh ana-docker 'docker run --rm httpd:2.4-alpine htpasswd -nbB vm-esh-nas "<PW>"' \
| ssh -t ana-docker 'sudo tee -a /mnt/backup/restic/repo/ana/.htpasswd >/dev/null'
# Single ssh invocation — the pipe must stay on the REMOTE side so
# sudo can prompt on the local keyboard. `ssh -t ... | ssh -t ...`
# breaks because sudo's password read conflicts with the pipe contents.
ssh -t ana-docker '
docker run --rm httpd:2.4-alpine htpasswd -nbB vm-esh-nas "<PW>" \
| sudo tee -a /mnt/backup/restic/repo/ana/.htpasswd >/dev/null
'
```
Heads-up: the password is in your shell history after this runs.
Scrub with `history -d <line>` or `history -c`.
### 3. Install restic creds on vm-esh-nas
```bash