π ~1 min read
Table of contents
Symptom & Impact
Remote administrators cannot authenticate through SSH after policy changes.
Environment & Reproduction
Seen after adjusting sshd_config, PAM rules, or key-based auth settings.
Root Cause Analysis
Misconfigured AllowUsers, permissions, or disabled authentication methods.
Quick Triage
Use console access to confirm sshd is running and port is listening.
Step-by-Step Diagnosis
Run sshd -t, inspect auth logs, and validate ownership of ~/.ssh and authorized_keys.

Solution – Primary Fix
Correct sshd directives, fix key file permissions, and reload ssh service safely.
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
Temporarily allow password auth from trusted network for emergency access.
Verification & Acceptance Criteria
Key authentication works and unauthorized login attempts remain blocked.
Rollback Plan
Restore last known-good sshd_config backup and reapply hardened settings incrementally.
Prevention & Hardening
Test configuration with sshd -t and staged reload before production deployment.
Related Errors & Cross-Refs
Permission denied publickey, bad ownership or modes for directory.
Related tutorial: View the step-by-step tutorial for Ubuntu 18.04 LTS.
View all Ubuntu 18.04 LTS tutorials on the Tutorials Hub β
Browse all common problems & solutions on the Tutorials Hub.
References & Further Reading
OpenSSH server documentation and Ubuntu hardening recommendations.
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.