π ~1 min read
Table of contents
Symptom & Impact
Public key login fails while password login may still work.
Environment & Reproduction
sshd reports key refused, bad ownership, or no matching key type allowed.
Root Cause Analysis
Improper file modes, wrong authorized_keys path, unsupported key algorithms, or SELinux labels.
Quick Triage
Check ~/.ssh permissions, sshd_config directives, and client key algorithm compatibility.
Step-by-Step Diagnosis
Set user home, .ssh, and authorized_keys permissions to OpenSSH-safe values.

Solution – Primary Fix
Use journalctl -u sshd and client -vvv output to isolate exact rejection cause.
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
Run restorecon -Rv on user home SSH paths when labels are inconsistent.
Verification & Acceptance Criteria
Ensure enterprise crypto policy and sshd accepted key types match generated keys.
Rollback Plan
After configuration edits, run systemctl reload sshd and retest.
Prevention & Hardening
Keep a console or break-glass admin account available during key auth changes.
Related Errors & Cross-Refs
Use configuration management to enforce correct key permissions and options.
Related tutorial: View the step-by-step tutorial for rhel-9.
View all rhel-9 tutorials on the Tutorials Hub β
Browse all common problems & solutions on the Tutorials Hub.
References & Further Reading
Confirm key login success from trusted jump hosts and audit log cleanliness.
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.