📖 ~1 min read

Table of contents
  1. Symptom & Impact
  2. Environment & Reproduction
  3. Root Cause Analysis
  4. Quick Triage
  5. Step-by-Step Diagnosis
  6. Solution – Primary Fix
  7. Solution – Alternative Approaches
  8. Verification & Acceptance Criteria
  9. Rollback Plan
  10. Prevention & Hardening
  11. Related Errors & Cross-Refs
  12. References & Further Reading

Symptom & Impact

Ubuntu 22.04 host rejects SSH connections when the service is down or blocked.

Environment & Reproduction

Clients see connection refused, timeout, or immediate disconnect after authentication attempts.

Root Cause Analysis

OpenSSH server not installed, service stopped, firewall rules, or wrong listen address.

Quick Triage

Verify local console access, host IP, and whether SSH is expected on port 22.

Step-by-Step Diagnosis

Run systemctl status ssh, ss -tulpn | grep :22, and sudo ufw status verbose.

Illustrative mockup for ubuntu-22-04-lts — post-137-1
Illustrative mockup – Progressive Robot — Illustrative mockup — Progressive Robot

Solution – Primary Fix

Install openssh-server if missing, start and enable ssh service, and allow OpenSSH in UFW.

Still having issues? Our IT Solutions & Services team can diagnose and resolve this for you. Get in touch for a free consultation.

Illustrative mockup for ubuntu-22-04-lts — post-137-2
Illustrative mockup – Progressive Robot — Illustrative mockup — Progressive Robot

Solution – Alternative Approaches

Reconnect from a client and confirm stable session with key or password login.

Verification & Acceptance Criteria

Use key-based authentication and monitor ssh service status after updates.

Rollback Plan

Disable root SSH login and enforce strong authentication policies.

Prevention & Hardening

Keep reverse DNS and network latency optimized for quicker SSH handshakes.

Revert sshd_config changes that caused startup failure and reload service.

Related tutorial: View the step-by-step tutorial for Ubuntu 22.04 LTS.

View all Ubuntu 22.04 LTS tutorials on the Tutorials Hub →

Browse all common problems & solutions on the Tutorials Hub.

References & Further Reading

Use man sshd_config and Ubuntu OpenSSH server guides.

Need Expert Help?

If you cannot resolve this yourself, our team offers hands-on Server Management, Managed IT Services, and flexible Support Plans. Contact us today — we respond within one business day.