π ~1 min read
Table of contents
Symptom & Impact
SSH login fails despite correct username and key pair expectations.
Environment & Reproduction
Ubuntu 16.04 servers with hardened SSH settings and key-based auth.
Root Cause Analysis
Key mismatch, file permission issues, or sshd auth policy blocks key acceptance.
Quick Triage
Inspect ssh client verbose output and server auth logs for rejection reason.
Step-by-Step Diagnosis
Check authorized_keys content, ownership, modes, and sshd authentication directives.

Solution – Primary Fix
Install correct public key, enforce strict file permissions, and reload sshd.
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
Enable temporary password auth for break-glass access with strict controls.
Verification & Acceptance Criteria
Public key login succeeds and unauthorized keys remain rejected.
Rollback Plan
Reinstate previous SSH auth settings if new policy blocks critical automation.
Prevention & Hardening
Standardize key provisioning and continuously audit SSH file permissions.
Related Errors & Cross-Refs
Authentication refused bad ownership and Permission denied (publickey).
Related tutorial: View the step-by-step tutorial for Ubuntu 16.04 LTS.
View all Ubuntu 16.04 LTS tutorials on the Tutorials Hub β
Browse all common problems & solutions on the Tutorials Hub.
References & Further Reading
OpenSSH key authentication and Ubuntu account security documentation.
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.