Files
BackTunnel/scripts/backtunnel-authorize
sysadminmatmoz fcbd6514cc 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.
2025-09-20 17:17:26 +02:00

10 lines
330 B
Bash

#!/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"