SSH:bad ownership or modes for directory の対処法

ssh -vvv で下記 bad ownership or modes for directory メッセージが出た場合の対処法。
Ubuntu だと /var/log/auth.log で確認できます。

Oct 11 16:24:58 ccieojisan-dev sshd[13055]: Authentication refused: bad ownership or modes for directory /home/ccieojisan

パーミッションが原因なので、下記コマンドで修正する。

chmod go-w ~/
chmod 700 ~/.ssh
chmod 600 ~/.ssh/authorized_keys
スポンサーリンク