π ~1 min read
Table of contents
Symptom & Impact
Administrators cannot authenticate with keys, resulting in emergency console dependence and delayed incident response.
Environment & Reproduction
Usually follows home directory migration, permission drift, or strict sshd policy hardening updates.
Root Cause Analysis
OpenSSH rejects key-based auth when ownership, permissions, or algorithm policy do not satisfy server requirements.
Quick Triage
Run ssh -vvv user@host and check server logs for explicit key rejection reasons before changing auth methods.
Step-by-Step Diagnosis
Validate chmod 700 ~/.ssh, chmod 600 ~/.ssh/authorized_keys, and inspect /var/log/auth.log for “Authentication refused” lines.

Solution – Primary Fix
Correct file ownership, ensure PubkeyAuthentication yes, reload sshd, and test login with one controlled key pair.
Still having issues? Our IT Consulting team can diagnose and resolve this for you. Get in touch for a free consultation.

Solution – Alternative Approaches
Temporarily allow password auth in restricted maintenance window while keys are reissued and policy updated.
Verification & Acceptance Criteria
Key login must succeed without password prompt and audit logs should show accepted publickey entries.
Rollback Plan
Restore prior sshd_config and known working authorized_keys snapshots if policy change unexpectedly blocks users.
Prevention & Hardening
Use config management for permissions, rotate keys regularly, and monitor failed-auth spikes in SIEM.
Related Errors & Cross-Refs
Frequent strings include “Permission denied (publickey)” and “Authentication refused: bad ownership”.
Related tutorial: View the step-by-step tutorial for debian-11.
View all debian-11 tutorials on the Tutorials Hub β
Browse all common problems & solutions on the Tutorials Hub.
References & Further Reading
Review sshd_config manual pages and Debian OpenSSH hardening guidance.
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.