π ~1 min read
Table of contents
Symptom & Impact
SSH daemon fails to start or rejects key auth, blocking remote administration.
Environment & Reproduction
Usually after manual file copy, permission inheritance, or config deployment drift.
sudo systemctl status ssh
Root Cause Analysis
OpenSSH enforces strict ownership and mode checks on host/user key and config files.
Quick Triage
Run config test and inspect authentication logs.
sudo sshd -t && sudo journalctl -u ssh --since -1h
Step-by-Step Diagnosis
Verify modes and owners for critical SSH paths.
sudo ls -ld /etc/ssh /home/*/.ssh && sudo ls -l /etc/ssh/ssh_host_*

Solution – Primary Fix
Restore secure permissions and restart SSH service.
Still having issues? Our IT Consulting team can diagnose and resolve this for you. Get in touch for a free consultation.
sudo chmod 700 ~/.ssh && sudo chmod 600 ~/.ssh/authorized_keys && sudo systemctl restart ssh

Solution – Alternative Approaches
Use console access and temporary password auth only during controlled remediation.
Verification & Acceptance Criteria
`sshd -t` passes and key-based logins succeed from approved admin hosts.
Rollback Plan
Revert recent SSH config changes if stricter settings unintentionally block legitimate access.
Prevention & Hardening
Enforce permission baselines with configuration management and periodic compliance scans.
Related Errors & Cross-Refs
Related to `bad ownership or modes`, failed host key load, and PAM auth lockouts.
Related tutorial: View the step-by-step tutorial for Ubuntu 26.04 LTS.
View all Ubuntu 26.04 LTS tutorials on the Tutorials Hub β
Browse all common problems & solutions on the Tutorials Hub.
References & Further Reading
Ubuntu OpenSSH service and hardening 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.