Files
Linux_post_install/bin/pos-ssh-load-keys
Your Name 99085adc76 feat: add web dashboard with slide-in drawer navigation
- Flask backend with 23 API routes (entertainment, telegram, docker, system)
- Alpine.js + Tailwind CSS dark-mode SPA with 4 tabs
- pos-dashboard CLI tool with port/config management
- Mobile slide-in drawer with swipe-to-close
- Sticky header stays pinned on scroll
- Tab completion fixes for category-less tools
- POST /api/telegram/commands endpoint for adding commands
2026-08-18 11:54:41 -04:00

43 lines
913 B
Bash
Executable File

#!/usr/bin/env bash
set -euo pipefail
# POS: ssh load-keys — Load all SSH keys into the agent
source "$(dirname "$0")/../lib/common.sh" 2>/dev/null || source "$(dirname "$0")/common.sh"
usage() {
cat <<EOF
Usage: pos ssh load-keys
Load all SSH private keys into the ssh-agent.
Requires ssh-agent.service running (socket at /run/ssh-agent/socket).
EOF
exit 0
}
case "${1:-}" in
-h|--help) usage ;;
esac
export SSH_AUTH_SOCK="${SSH_AUTH_SOCK:-/run/ssh-agent/socket}"
loaded=0
for key in ~/.ssh/id_*; do
[ -f "$key" ] || continue
case "$key" in
*.pub|known_hosts|authorized_keys|config) continue ;;
esac
ssh-keygen -y -f "$key" &>/dev/null || continue
if ssh-add "$key" 2>/dev/null; then
loaded=$((loaded + 1))
fi
done
if [ "$loaded" -eq 0 ]; then
echo "No SSH keys found in ~/.ssh/"
else
ok "Loaded $loaded key(s) into ssh-agent"
fi
ssh-add -l