Add accessor key authorization and enhance completion logic
Introduce `backtunnel-authorize` for managing restricted SFTP-only keys, and update `backtunnel-share` to support temporary accessor key authorization via `--allow-key` and `--allow-known`. Extend bash completion with profile, accessor, and SSH host suggestions. Revamp README sections to include updated workflows, quick starts, and key management details.
This commit is contained in:
9
scripts/backtunnel-authorize
Normal file
9
scripts/backtunnel-authorize
Normal file
@@ -0,0 +1,9 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
name="${1:-}"
|
||||
file="${2:-}"
|
||||
[[ -n "$name" && -n "$file" && -f "$file" ]] || { echo "Usage: backtunnel-authorize <name> <pubkey-file>"; exit 1; }
|
||||
dir="${XDG_CONFIG_HOME:-$HOME/.config}/backtunnel/authorized"
|
||||
mkdir -p "$dir"
|
||||
install -m 644 "$file" "$dir/$name.pub"
|
||||
echo "Saved: $dir/$name.pub"
|
||||
Reference in New Issue
Block a user