restic/vm-esh-nas: fix htpasswd-append example (single ssh, not piped pair)
This commit is contained in:
@@ -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:
|
If not already present from an earlier pass:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Generate the bcrypt line locally (httpd:2.4-alpine throwaway container)
|
# Single ssh invocation — the pipe must stay on the REMOTE side so
|
||||||
ssh ana-docker 'docker run --rm httpd:2.4-alpine htpasswd -nbB vm-esh-nas "<PW>"' \
|
# sudo can prompt on the local keyboard. `ssh -t ... | ssh -t ...`
|
||||||
| ssh -t ana-docker 'sudo tee -a /mnt/backup/restic/repo/ana/.htpasswd >/dev/null'
|
# 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
|
### 3. Install restic creds on vm-esh-nas
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
|||||||
Reference in New Issue
Block a user