Commit Graph

6 Commits

Author SHA1 Message Date
root
7a748fb8ac Add troubleshooting for wrong SSH_AUTH_SOCK socket issue
Addresses the issue where multiple ssh-agent processes run and the shell
uses /tmp/ssh-* socket instead of systemd's socket.

Improvements:
- Enhanced diagnostic script detects wrong socket usage automatically
- New troubleshooting section for "Multiple ssh-agent processes running"
- Step-by-step fix to clean up ~/.bashrc and use correct socket
- Verification steps to confirm fix

Fixes the symptom: 12 agents running, SSH_AUTH_SOCK pointing to /tmp
instead of ${XDG_RUNTIME_DIR}/ssh-agent.socket

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-14 07:43:46 +00:00
root
e73f41ab05 Add SSH key mismatch troubleshooting to VPS setup guide
Added critical troubleshooting section for "identity_sign: private key
contents do not match public" error under Common Issues.

Includes:
- Quick fix command to generate correct public key
- Step-by-step instructions to update key on Gitea
- Full diagnostic script for key mismatch investigation

Addresses the issue where wrong public keys get uploaded to Gitea,
causing authentication failures after initial setup works.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-14 07:36:49 +00:00
Homelab Automation
a0acb5b7fe Fix SSH agent persistence with systemd user service (ROBUST)
PROBLEM: Step 7 ~/.bashrc method still not persistent - agent dies on logout

ROOT CAUSE: ~/.bashrc approach relies on shell process lifecycle
- Agent dies when last shell exits
- Socket files get cleaned up
- User must manually restart on next login

NEW SOLUTION: Systemd user service keeps agent truly persistent
- Agent runs as systemd service (survives logout/reboot)
- Single socket location managed by systemd
- Auto-starts on user login
- Works across all shells and sessions
- No manual intervention needed

IMPROVEMENTS:
- Added systemd-based setup as recommended method
- Kept ~/.bashrc method as fallback (for systems without systemd)
- Added comprehensive diagnostic script
- Added troubleshooting for common issues
- Quick reference commands for management

The systemd method is production-grade and used in enterprise environments.
SSH agent now persists forever (until explicitly stopped).
2025-12-13 22:24:14 +00:00
Homelab Automation
cb89dfccbb Fix Step 7: SSH Agent persistence now works correctly
PROBLEM: Original Step 7 script was buggy - agent would die on logout

SOLUTION: Rewritten Step 7 with proper ssh-agent persistence that:
- Detects existing running agents and reuses socket
- Persists socket location across shell sessions
- Auto-loads SSH key on new terminals
- Works reliably across multiple terminal windows

Key changes:
- Saves SSH_AUTH_SOCK to ~/.ssh/agent.sock for persistence
- Auto-adds key if not already loaded
- Includes simpler fallback version if complex version fails
- Detailed troubleshooting section
- Clear instructions on placement in ~/.bashrc

Agent now stays loaded for the entire user session duration.
2025-11-27 06:23:00 +00:00
pdm
fd5f024a08 Update VPS-SSH-KEY-SETUP.md
added #Make SSH Agent Persistent
2025-11-25 22:54:51 +00:00
root
108de3be60 Add VPS SSH key setup guide 2025-11-24 10:37:55 +00:00