π ~1 min read
Table of contents
Symptom & Impact
Users with valid keys cannot log in and receive Permission denied (publickey), delaying operational access and emergency response.
Environment & Reproduction
Frequent on Ubuntu 14.04 after home directory migration, permission drift, or hardened sshd_config changes without compatibility validation.
Root Cause Analysis
sshd rejects key authentication because file ownership, directory mode, key format, or Match/User policy does not meet security requirements.
Quick Triage
Check auth.log entries, verify ~/.ssh and authorized_keys permissions, and confirm user shell and account state before deeper changes.
Step-by-Step Diagnosis
Run ssh -vvv from client, inspect server-side sshd -T output, and compare offered key type with accepted algorithms on old OpenSSH versions.

Solution – Primary Fix
Correct ownership and mode for user home and .ssh files, place valid public key in authorized_keys, then reload ssh service.
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 permit password auth for controlled break-glass access, deploy centralized key management, or rotate users to standardized key policy.
Verification & Acceptance Criteria
Key-based login succeeds from authorized clients, auth logs show accepted publickey entries, and password fallback is disabled if policy requires.
Rollback Plan
Restore prior sshd_config and authorized_keys backups if new hardening changes block legitimate access unexpectedly.
Prevention & Hardening
Automate key deployment with strict permissions, monitor auth failures, and enforce SSH configuration linting before rollouts.
Related Errors & Cross-Refs
Related to UFW lockouts, DNS reverse lookup delays, and PAM misconfiguration that presents as SSH auth failure.
Related tutorial: View the step-by-step tutorial for Ubuntu 14.04 LTS.
View all Ubuntu 14.04 LTS tutorials on the Tutorials Hub β
Browse all common problems & solutions on the Tutorials Hub.
References & Further Reading
See sshd_config manual, OpenSSH troubleshooting guides, and your security baseline for SSH access on legacy Linux.
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.