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

Illustrative mockup for ubuntu-14-04-lts β€” ubuntu1404-b01-p14-diagnosis
auth.log indicates publickey rejection reasons β€” Illustrative mockup β€” Progressive Robot

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.

Illustrative mockup for ubuntu-14-04-lts β€” ubuntu1404-b01-p14-fix
authorized_keys permissions corrected and login works β€” Illustrative mockup β€” Progressive Robot

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 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.