Affected versions: Ubuntu 24.04 LTS

πŸ“– ~1 min read

Table of contents
  1. Symptom & Impact
  2. Environment & Reproduction
  3. Root Cause Analysis
  4. Quick Triage
  5. Step-by-Step Diagnosis
  6. Solution – Primary Fix
  7. Solution – Alternative Approaches
  8. Verification & Acceptance Criteria
  9. Rollback Plan
  10. Prevention & Hardening
  11. Related Errors & Cross-Refs
  12. References & Further Reading

Symptom & Impact

Remote login fails even though ssh service appears active in systemctl.

Environment & Reproduction

Ubuntu 24.04 LTS server with custom ListenAddress or Port settings in sshd_config.

Root Cause Analysis

sshd binds only to loopback or wrong interface due to restrictive daemon configuration.

Quick Triage

Use ss -tulpn | grep :22 and sshd -t to validate listening sockets and syntax.

Step-by-Step Diagnosis

Review /etc/ssh/sshd_config and included snippets for conflicting Port or AddressFamily directives.

Illustrative mockup for ubuntu-24-04-lts β€” ssh_not_listening_diag
ss output shows sshd missing expected listen endpoint β€” Illustrative mockup β€” Progressive Robot

Solution – Primary Fix

Set correct ListenAddress and Port, reload ssh service, and test from a remote client.

Still having issues? Our IT Solutions & Services team can diagnose and resolve this for you. Get in touch for a free consultation.

Illustrative mockup for ubuntu-24-04-lts β€” ssh_not_listening_fixed
sshd binds correctly and remote connections succeed β€” Illustrative mockup β€” Progressive Robot

Solution – Alternative Approaches

Run sshd on a secondary management port during migration windows to avoid lockout.

Verification & Acceptance Criteria

ss confirms expected bind endpoints and remote SSH authentication works reliably.

Rollback Plan

Restore previous sshd_config backup and restart ssh if new listen settings fail.

Prevention & Hardening

Validate sshd configuration with sshd -t in change automation before service reload.

UFW rules and cloud security groups can block access even with correct local bind state.

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

OpenSSH server configuration and Ubuntu secure remote access 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.