📖 ~1 min read
Table of contents
Symptom & Impact
Remote administration fails because TCP connections to SSH port are rejected.
Environment & Reproduction
Occurs after service crashes, config edits, or firewall policy changes.
ssh user@host
Root Cause Analysis
OpenSSH daemon is inactive, misconfigured, or blocked by local firewall rules.
Quick Triage
Check sshd status and active listening sockets.
sudo systemctl status ssh
sudo ss -tulpn | grep :22
Step-by-Step Diagnosis
Validate sshd config syntax and inspect recent authentication daemon logs.
sudo sshd -t
sudo journalctl -u ssh -n 80

Solution – Primary Fix
Correct sshd configuration, start service, and allow SSH in UFW.
Still having issues? Our IT Solutions & Services team can diagnose and resolve this for you. Get in touch for a free consultation.
sudo systemctl restart ssh
sudo ufw allow OpenSSH
sudo ufw reload

Solution – Alternative Approaches
Temporarily expose a maintenance port with strict source IP allowlist.
Verification & Acceptance Criteria
SSH handshake succeeds and interactive shell access is available.
ssh -v user@host
sudo systemctl is-active ssh
Rollback Plan
Restore prior sshd_config and firewall rule set from backup if needed.
Prevention & Hardening
Apply config testing before reload and monitor ssh service health continuously.
Related Errors & Cross-Refs
Can overlap with key authentication failures, fail2ban bans, and route ACL blocks.
Related tutorial: View the step-by-step tutorial for Ubuntu 26.04 LTS.
View all Ubuntu 26.04 LTS tutorials on the Tutorials Hub →
Browse all common problems & solutions on the Tutorials Hub.
References & Further Reading
Ubuntu OpenSSH server administration and hardening guidance.
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.