Affected versions: Ubuntu 20.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

Users with valid keys are denied access, blocking remote administration and automation jobs.

Environment & Reproduction

Appears after tightening sshd settings, changing file ownership, or enabling strict modes.

Root Cause Analysis

Permission mismatch, disabled pubkey auth directives, or incorrect AuthorizedKeysFile path.

Quick Triage

Keep an open console session and test sshd configuration before restarting daemon.

Step-by-Step Diagnosis

Use verbose SSH client output and server auth logs to identify the exact rejection reason.

Illustrative mockup for ubuntu-20-04-lts — security_lock
SSH public key auth rejected after config changes — Illustrative mockup — Progressive Robot

Solution – Primary Fix

Restore correct file permissions and sshd directives, then reload daemon 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-20-04-lts — log_or_config
Corrected sshd and authorized_keys permissions — Illustrative mockup — Progressive Robot

Solution – Alternative Approaches

Use emergency serial console access and temporary password login while key paths are repaired.

Verification & Acceptance Criteria

Key-based login succeeds for approved users and unauthorized methods remain blocked.

Rollback Plan

Revert to previous sshd configuration backup and restore known-good ACLs.

Prevention & Hardening

Validate hardening changes in staging and automate permissions checks with compliance scripts.

Can overlap with home directory ACL issues and SELinux/AppArmor policy denials.

Related tutorial: View the step-by-step tutorial for Ubuntu 20.04 LTS.

View all Ubuntu 20.04 LTS tutorials on the Tutorials Hub →

Browse all common problems & solutions on the Tutorials Hub.

References & Further Reading

OpenSSH server documentation and Ubuntu security 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.