Troubleshooting sshd

As per an earlier article on tunneling, I had setup some tunnels to allow secure access to my database behind the firewall. I haven’t however done much development locally in awhile, so I hadn’t used this tunnel. Just recently, I discovered that it wasn’t working anymore. Digging deeper I found that my public-key authentication was breaking somehow for a particular user.

Trying to debug things with “-v” wasn’t giving me useful information, so I thought I’m sure there must be something in the logs and luckily came across this post:

http://beerpla.net/2008/08/15/debugging-weird-sshd-connection-problems-what-happens-when-you-stop-sshd/

The long and short of it, was just like Artem, my issue was permissions of the home directory of the authenticating user. A quick fix to that and we were all set.

Thinking about it, now I remember I’d been having permissions issues within my virtual hosts, so I’d “chown -R”‘d them to the apache user. This ended up preventing me from being able to read the home directory(which happened to be the webroot) of the special user I’d created for tunneling and managing webfiles. Silly me.

The big lesson here: like most things on Unix – permissions should always be the first thing to check.

Leave a Reply