πŸ“– ~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 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.

Illustrative mockup for ubuntu-18-04-lts β€” post-109-1
Illustrative SSH denial log review – Progressive Robot β€” Illustrative mockup β€” Progressive Robot

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.

Illustrative mockup for ubuntu-18-04-lts β€” post-109-2
Illustrative sshd config remediation – Progressive Robot β€” Illustrative mockup β€” Progressive Robot

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.

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.