Benjamin Juang (ibneko) wrote,
Benjamin Juang

sshd key troubles...

So I ran into a bit of an odd problem. The symptoms were:
I made a set of ssh keys to log into our set of webservers. The keys worked for a while then suddenly stopped working yesterday for all of the webservers. They would just be rejected by the server completely. However, if I moved the keys to another account's home directory, it worked perfectly when I tried to log in as the user.

1) Keys were fine.
2) Key permissions were fine.
3) SSH was fine - I could log in as that user using the password.

I ended up checking /var/log/secure and discovered the following error:
"Authentication refused: bad ownership or modes for directory /home/userdude" (userdude is not the actual user name :D )

Turns out I had accidentally changed /home/userdude over to 777 (rwxrwxrwx). A quick google search revealed This page which suggested the home directory had to be tightened down to remove global and other write permissions: chmod go-w ~/

I ended up dropping the home directory down to 700 to simplify things.

  • The next four years will be interesting

    Likely in a bad, terribly, horrible way. Hopefully not, but I expected Trump not to win, but still, it happened. That said, I think we're doing…

  • OMG Pokemon Go! <3

    Lots of bugs and crashing and freezing, although it's been getting better, but oh my goodness. It's absurdly awesome to watch random people all show…

  • Kill La Kill

    Just finished watching Kill La Kill (24 episodes). I loved it and would highly recommend it for the crazy over-the-top action, crazy comedy (there…

  • Post a new comment


    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded