📖 ~1 min read
Table of contents
Symptom & Impact
SSH key login fails and falls back to password or access denial.
Environment & Reproduction
Ubuntu 20.04 user account migrated or copied from another system.
Root Cause Analysis
Insecure ownership or mode on home, .ssh, or authorized_keys is rejected.
Quick Triage
Use ssh -vvv from client and inspect auth.log on the server.
Step-by-Step Diagnosis
Audit file modes, ownership, and sshd config directives for key auth.

Solution – Primary Fix
Set strict permissions, correct ownership, reload sshd, and retest login.
Still having issues? Our IT Consulting team can diagnose and resolve this for you. Get in touch for a free consultation.

Solution – Alternative Approaches
Use centralized key management with controlled provisioning workflows.
Verification & Acceptance Criteria
Public key authentication succeeds without interactive password prompts.
Rollback Plan
Restore prior SSH config backup if policy enforcement causes lockout.
Prevention & Hardening
Automate permissions checks and disable password auth where possible.
Related Errors & Cross-Refs
PAM restrictions and Fail2ban bans can mask key-auth troubleshooting.
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 security and file permission requirements on Ubuntu.
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.