π ~1 min read
Table of contents
Symptom & Impact
Remote administration fails because SSH daemon is not accepting connections.
Environment & Reproduction
Appears after reboot, package change, or sshd config edits.
ssh user@server
Root Cause Analysis
OpenSSH service is stopped, failed, or bound to unexpected interface or port.
Quick Triage
Check sshd service and listening sockets locally.
systemctl status ssh
sudo ss -tulpn | grep ':22'
Step-by-Step Diagnosis
Validate sshd configuration syntax and startup logs.
sudo sshd -t
sudo journalctl -u ssh -n 120

Solution – Primary Fix
Correct config errors and restart OpenSSH service.
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 systemctl enable ssh

Solution – Alternative Approaches
Temporarily open alternate maintenance channel via console while fixing sshd.
sudo loginctl list-sessions
Verification & Acceptance Criteria
SSH port is listening and remote login succeeds with expected auth method.
sudo ss -tulpn | grep sshd
ssh -v localhost
Rollback Plan
Restore previous sshd_config from backup if new hardening rules break access.
sudo cp /etc/ssh/sshd_config.bak /etc/ssh/sshd_config
sudo systemctl restart ssh
Prevention & Hardening
Validate sshd config with sshd -t before reload and keep out-of-band access available.
Related Errors & Cross-Refs
Often overlaps with UFW denies and fail2ban lockouts.
Related tutorial: View the step-by-step tutorial for Ubuntu 24.04 LTS.
View all Ubuntu 24.04 LTS tutorials on the Tutorials Hub β
Browse all common problems & solutions on the Tutorials Hub.
References & Further Reading
Ubuntu OpenSSH server administration and troubleshooting documentation.
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.