📖 ~1 min read
Table of contents
Symptom & Impact
Remote administration fails because SSH sessions are dropped by firewall policy.
Environment & Reproduction
Typically appears after rule reorder, profile changes, or default deny adjustments.
Root Cause Analysis
Port 22 allow rule is missing, overridden, or restricted to wrong source ranges.
Quick Triage
Inspect active UFW status, rule order, and current SSH daemon listen settings.
Step-by-Step Diagnosis
Trace packet decision path and verify whether SSH traffic hits deny rules.

Solution – Primary Fix
Add explicit SSH allow rules and reload UFW without disrupting established sessions.
Still having issues? Our IT Consulting team can diagnose and resolve this for you. Get in touch for a free consultation.

Solution – Alternative Approaches
Use console access and temporary iptables rule for emergency remote recovery.
Verification & Acceptance Criteria
New and existing SSH connections succeed from approved networks consistently.
Rollback Plan
Restore previous firewall backup if access policy changes produce wider outages.
Prevention & Hardening
Automate firewall policy tests to ensure management access remains preserved.
Related Errors & Cross-Refs
Connection timed out and no route to host can indicate firewall filtering.
Related tutorial: View the step-by-step tutorial for Ubuntu 16.04 LTS.
View all Ubuntu 16.04 LTS tutorials on the Tutorials Hub →
Browse all common problems & solutions on the Tutorials Hub.
References & Further Reading
Review UFW and OpenSSH hardening documentation for production-safe access control.
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.