📖 ~1 min read
Table of contents
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.

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.

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.
Related Errors & Cross-Refs
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.