Update default mount point to $HOME/remote-rssh for consistency, and introduce backtunnel-auth-setup script for restricted SFTP-only key management. Update docs, scripts, and uninstall/install logic to reflect changes. Ensure robust handling of user-specified mount points in backtunnel-access.

This commit is contained in:
2025-09-20 10:49:45 +02:00
parent c46a1da405
commit 85e73ca4da
9 changed files with 144 additions and 26 deletions

View File

@@ -18,7 +18,7 @@ backtunnel-share /path/to/folder with remoteuser:remotehost for <duration> [opti
- `-p, --tunnel-port <PORT>`: Remote port to expose with `-R` (default: 2222)
- `-l, --local-ssh-port <PORT>`: Local sshd port to forward to (default: 22)
- `-i, --invite`: Print a ready-to-copy access command for the remote user
- `--invite-mount <PATH>`: Suggest mount point in the invite (default: `/mnt/remote-rssh`)
- `--invite-mount <PATH>`: Suggest mount point in the invite (default: `~/remote-rssh`)
- `--invite-file <FILE>`: Also write the invite text (including unmount hint) to a file
- `--qr`: Render the invite as a QR code (requires `qrencode`)
@@ -36,12 +36,12 @@ backtunnel-share ~/projects with alice@vps.example.com for 1d -p 4422 -l 2222 -i
The invite will look like this and can be pasted on the remote host:
```bash
backtunnel-access '/home/user/projects' from alice@vps.example.com -p 4422 -m '/mnt/remote-rssh'
backtunnel-access '/home/user/projects' from alice@vps.example.com -p 4422 -m "$HOME/remote-rssh"
```
Unmount on the remote side with:
```bash
fusermount -u /mnt/remote-rssh
fusermount -u ~/remote-rssh
```
### `backtunnel-access`
@@ -54,7 +54,7 @@ backtunnel-access /path/to/folder from remoteuser:remotehost [options]
**Options**
- `-p, --port <PORT>`: Port on the remote host where the reverse tunnel listens (default: 2222)
- `-m, --mount-point <PATH>`: Local mount point (default: `/mnt/remote-rssh`)
- `-m, --mount-point <PATH>`: Local mount point (default: `~/remote-rssh`)
---
@@ -183,7 +183,7 @@ Each run produces a log under `${XDG_STATE_HOME:-$HOME/.local/state}/backtunnel/
3. When prompted:
- **Print invite line for chat?** → Yes to get a one-liner your colleague can paste.
- **Show QR code for the invite?** → Yes (requires `qrencode`) to display a terminal QR.
- **Suggested mount point** → Accept `/mnt/remote-rssh` or set your own.
- **Suggested mount point** → Accept `~/remote-rssh` or set your own.
4. A terminal opens, shows the **invite** (and QR if selected), and keeps the share open for the chosen duration.
- Stop early with **Ctrl+C**.
@@ -191,9 +191,9 @@ Each run produces a log under `${XDG_STATE_HOME:-$HOME/.local/state}/backtunnel/
```bash
# Paste the invite you sent them, e.g.:
backtunnel-access '/path/to/folder' from user@vps.example.com -p 2222 -m '/mnt/remote-rssh'
backtunnel-access '/path/to/folder' from user@vps.example.com -p 2222 -m "$HOME/remote-rssh"
# Unmount when done:
fusermount -u /mnt/remote-rssh # or: umount /mnt/remote-rssh
fusermount -u ~/remote-rssh # or: umount ~/remote-rssh
```
---