Troubleshooting
After a home directory is restored from backup, user jlee can no longer log in over SSH with a key. The client ends with "Permission denied (publickey)" and /var/log/secure shows "Authentication refused: bad ownership or modes for directory /home/jlee." The directory is mode 0777. What is the BEST fix?
Show the answer
Correct answerC. Remove group and world write access from the home directory with chmod go-w /home/jlee
With StrictModes enabled, sshd refuses keys when the home directory is writable by others, so the mode must be corrected. Turning StrictModes off hides the problem and weakens security. Replacing the key does not help because the key is not the problem.