Brennan Blog

Technical blog about cloud computing, DevOps, and personal projects

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

  1. Systemd socket management overrides traditional SSH config
  2. Recovery console is your lifeline
  3. Test incrementally - one change at a time
  4. 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.