SSH Recovery: When Your Droplet Locks You Out
SSH Recovery: When Your Droplet Locks You Out
Today I experienced every sysadmin’s nightmare: getting locked out of my own server. But instead of rebuilding from scratch, I successfully recovered access and learned valuable lessons about systemd socket management.
The Problem: SSH Connection Timeout
Creating SSH recovery post…
The Root Cause: Systemd Socket Configuration
SSH was listening on port 2222 instead of 22 due to systemd socket configuration:
The Solution: Systemd Drop-in Override
Lessons Learned
- Systemd socket management overrides traditional SSH config
- Recovery console is your lifeline
- Test incrementally - one change at a time
- Document everything for future reference
Emergency Recovery Commands
This 45-minute troubleshooting session taught me more about Linux administration than months of normal operations.
For the complete troubleshooting guide, see my TROUBLESHOOTING.md.