12 Troubleshooting Handbook
This handbook provides a practical, symptom-first path for diagnosing SSH Teams issues in development and production environments.
12.1 Fast Triage Flow
graph TD
A[Issue reported] --> B{Where does it fail}
B -->|Service start| C[Check container or app logs]
B -->|Browser login| D[Check URL TLS session and redirects]
B -->|Device init| E[Check device flow and token polling]
B -->|Certificate issue| F[Check policy match DPoP and host fingerprint]
C --> G[Apply fix and retest]
D --> G
E --> G
F --> G
G --> H{Resolved}
H -->|Yes| I[Close incident and record root cause]
H -->|No| J[Collect diagnostics bundle and escalate]
Triage checklist before deep investigation:
- Capture failing command or URL and exact timestamp.
- Identify environment and hostname (lab, staging, production).
- Confirm whether failure is user-specific or system-wide.
- Confirm whether issue is new or after a known change.
12.2 Install and Startup Failures
Common symptoms:
- UI unreachable after deployment.
- Container exits repeatedly or restart loop.
/loginreturns 5xx.
Checks:
- Verify ports and process state.
- Verify persistence paths are mounted and writable.
- Verify backend mode variables are coherent (
nitratevsmongo). - Verify TLS files and configuration directory access.
Useful commands:
docker ps --filter name=sshteam
docker logs --tail=200 sshteam
curl -k -I https://<hostname>:8443/login
curl -I http://<hostname>:8080/login
Frequent root causes:
- Port mapping mismatch (
8080:8888,8443:8443expected in examples). - Incorrect
MONGODB_URIor unreachable Mongo endpoint in mongo mode. - Missing or permission-blocked
conf.dor data path.
12.3 Browser and Authentication Failures
Common symptoms:
- Redirect loops between
/loginand protected pages. - 403/401 after successful credential submission.
- Setup page unavailable when expected.
Checks:
- Confirm target URL and scheme are correct.
- Confirm session cookies are accepted for the host.
- Confirm user role and team assignment are valid.
- Confirm instance initialization state (first-run setup already completed or not).
Operator actions:
- Retry in private browsing mode to isolate stale cookies.
- Re-authenticate and verify redirect destination.
- Confirm admin permissions for administration routes.
Expected route behavior:
- Unauthenticated request to protected page redirects to
/login. - First-run environments route root to
/setupuntil team creation is complete.
12.4 Device Flow Failures
Common symptoms:
authorization_pendingrepeats until timeout.access_deniedreturned during token polling.expired_tokenfor device code.invalid_dpop_proofon token or signing request.
Checks:
- Confirm the exact verify URL and
user_codefrom CLI output. - Confirm approval occurred for the same pending request.
- Confirm local clock skew is not excessive.
- Confirm device was not revoked.
Recovery actions:
- Re-run
sshteam init https://<hostname>. - Complete browser approval promptly.
- If DPoP mismatch persists, re-initialize device to regenerate key material.
Useful command:
sshteam init https://<hostname>
sshteam devices list
12.5 Policy Mismatch and Access Denials
Common symptoms:
- Signing request denied even with valid login/device.
- Some users can sign for a host while others cannot.
Checks:
- Confirm server fingerprint/tag mapping matches intended policy scope.
- Confirm requested principal matches policy principal constraints.
- Confirm active time window and timezone semantics.
- Confirm source IP constraints if configured.
- Confirm policy priority ordering and enabled state.
Remediation workflow:
- Test one known-allowed case.
- Test one known-denied case.
- Adjust one policy variable at a time.
- Re-test and document reason for final rule set.
12.6 Certificate Issuance Failures
Common symptoms:
sshteam signorsshteam issuereturns policy or auth errors.- SSH connection still fails after certificate issuance.
Checks:
- Confirm CLI request uses expected server context (
--serverwhen needed). - Confirm target host key fingerprint resolves correctly.
- Confirm certificate algorithm and key type are valid for your usage.
- Confirm joined server trusts current team CA in
TrustedUserCAKeys. - Confirm certificate validity window has not expired.
Useful commands:
sshteam sign <user@host> -k ~/.ssh/id_ed25519.pub
sshteam issue <user@host>
sshteam agent <user@host>
ssh -vvv <user@host>
Server-side validation:
- Verify joined host still has expected CA public keys.
- Verify sshd is reloaded after trust-file updates.
12.7 Known Gotchas and Diagnostics Commands
Known gotchas:
- Revoked devices cannot refresh or sign; this is expected behavior.
- Switching defaults across multiple CA servers can cause accidental wrong-target requests.
- Self-signed TLS in labs can look like auth failures when trust is broken.
Minimum diagnostics bundle for escalation:
- Failing command or URL and full error text.
- Timestamp and timezone.
- Relevant app/container logs around failure window.
- Confirmation of policy target (user, principal, host, tags, time).
- Whether device was recently re-initialized or revoked.
Quick command pack:
docker logs --tail=300 sshteam
curl -k -I https://<hostname>:8443/login
sshteam devices list
ssh -vvv <user@host>
Outcome expectation:
- Most incidents are isolated by identifying whether failure is auth/session, device/token, policy-evaluation, or host-trust related.
12.8 Prevention Checklist (Reduce Repeat Incidents)
Run these preventive checks on a schedule:
Weekly:
- Validate one known-good login and one certificate issuance path.
- Review newly revoked devices and confirm expected ownership.
- Check policy edits for unintended broad grants.
Monthly:
- Verify TLS certificate expiry window and renewal readiness.
- Validate backup restore path in a non-production environment.
- Re-test notification provider delivery and failover process.
After every high-impact change:
- Re-run one allow and one deny policy test.
- Re-run one
sshteam initand onesshteam signflow. - Capture outcomes in your operations log for trend tracking.