I am having problems logging into a machine remotely using ssh. It allows me to enter the user name, but when I enter the password I get "Access denied." I can login using the same user/pw locally and I have successfully logged in to the same machine remotely before using the same username/pw. It is not the caps lock key.
How can I debug this problem and find the cause of the rejection? I have root on the box and can access it locally.
I found the page OpenSSH logging wiki to be extremely helpful and led to solving the problem.
The problem was that I had changed the sshd port to a different number and forgotten that I had done it. Oddly enough sshd was still listening on 22, but just rejecting any login attempts on that port. Not sure why that is.