📖 ~1 min read
Table of contents
Symptom & Impact
Remote login fails with connection refused or timeout, blocking administration and automation.
Environment & Reproduction
Ubuntu 20.04 host with OpenSSH server, potentially behind ufw or cloud security groups.
Root Cause Analysis
sshd stopped, port changed, firewall deny rule, or networking issue prevents TCP/22 reachability.
Quick Triage
From console run ‘systemctl status ssh’, ‘ss -ltnp | grep :22’, and ‘sudo ufw status verbose’.
Step-by-Step Diagnosis
Check ‘/etc/ssh/sshd_config’, validate with ‘sshd -t’, and inspect journalctl for auth or bind errors.

Solution – Primary Fix
Enable/start ssh service, allow rule with ‘sudo ufw allow OpenSSH’, and reload daemon if config changed.
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
Use temporary alternate port and bastion host while remediating network path restrictions.
Verification & Acceptance Criteria
SSH handshake succeeds from approved source and key-based auth works without errors.
Rollback Plan
Revert sshd_config to backup and disable recent firewall policy changes if access worsens.
Prevention & Hardening
Use configuration management, keep console access, and monitor failed login plus sshd availability.
Related Errors & Cross-Refs
Permission denied (publickey), no route to host, and ufw route policy conflicts.
Related tutorial: View the step-by-step tutorial for Ubuntu 20.04 LTS.
View all Ubuntu 20.04 LTS tutorials on the Tutorials Hub →
Browse all common problems & solutions on the Tutorials Hub.
References & Further Reading
OpenSSH hardening guide, ufw application profiles, and Ubuntu server security docs.
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.