--- name: encrypted-ssh-access description: Use when managing SSH access to servers with PGP-encrypted passphrases and encrypted private keys. version: 1.0.0 --- # encrypted-ssh-access Use when managing SSH access to servers where the private key is encrypted and the passphrase is PGP-encrypted. ## Trigger User needs to SSH into a server where the private key is encrypted (e.g., DES-EDE3-CBC) and the passphrase is PGP-encrypted. ## Workflow 1. Import the PGP public key locally using: `gpg --import ` 2. Decrypt the passphrase using: `printf '' | gpg --batch --yes --decrypt 2>/dev/null` 3. Use the decrypted passphrase with SSH: `ssh -i passphrase user@host` 4. If key is also encrypted with DES-EDE3-CBC, provide passphrase when prompted ## User Preferences (Always Apply) - **Credential Rule**: All API keys, tokens, passwords, secrets, connection strings must be replaced with `[REDACTED]` — never retain actual values - **Telegram Push**: User prefers Telegram push notifications over simple notes - **Telegram Format**: Use `Waltraut-Lichter*` for correct Telegram message formatting - **Battery Awareness**: Note that 'Batties are small battery-based LED lights' — may affect running processes - **PGP Focus Topic**: Prioritize PGP-encrypted password import and decryption per user directive ## Pitfalls & Gotchas - PGP decryption requires the private GPG key to be imported locally (public key only enables encryption) - SSH keys encrypted with DES-EDE3-CBC need a passphrase; losing it means losing access - `gpg --decrypt` fails with 'Kein geheimer Schlüssel' if only public key is imported - Always test SSH access with a simple command first: `ssh -i key user@host 'echo test'` - When user says 'Batties are small battery-b...', consider battery constraints on any persistent processes - **Headscale/Tailscale auth key consumption**: `tailscale up --auth-key=` consumes the key after a single use; the Headscale health check reports 'invalid pre auth key'. For Android registration with this VPN, use the app flow: *Accounts → ⋮ → Use an alternate server → https://vpn.robbis.space* rather than the CLI auth-key flag. - Never retain actual values for API keys, tokens, passwords, secrets, or connection strings — replace all such credentials with `[REDACTED]` per user directive. ## Support Files - `references/pgp-decryption-guide.md` — PGP decryption step-by-step - `references/ssh-key-workflow.md` — SSH access with encrypted keys - `scripts/decrypt-passphrase.sh` — Script to automate PGP decryption + SSH ## Example ```bash # Decrypt PGP-encrypted passphrase export PATH="/opt/homebrew/bin:$PATH" printf 'PGP_MESSAGE_HERE' | gpg --batch --yes --decrypt 2>/dev/null ``` --- *Skill created based on session signals: PGP encryption workflow, SSH key management, user preferences for [REDACTED] credentials, Telegram push, and battery-aware server access.*