Appearance
ADR 0006: SSH Hardening and Port Migration
Status
Accepted
Context
The VPS previously used a non-standard SSH port (2222) and relied on Tailscale for access. This caused complexity in automated scripts and potential connectivity issues. Additionally, password authentication was still enabled, posing a security risk.
Decision
- Migrate SSH back to the standard port 22.
- Disable PasswordAuthentication and ChallengeResponseAuthentication.
- Restrict root login to prohibit-password (Keys only).
- Consolidate authorized keys to only two trusted keys (
antigravityandvps_god_mode).
Consequences
- Pros:
- Simplified connectivity for local scripts and tools.
- Significantly increased security against brute-force attacks.
- Reduced complexity by following standard conventions.
- Cons:
- Requires local SSH keys on all client machines (Windows/Linux).
- Risk of lockout if keys are lost (mitigated by having a password-protected backup key).