in reply to Password Authentication

Are you sure there aren't newlines at the ends of the passwords? (As might happen if you pulled the passwords out of a file without chomp'ing lines.)

"ToP SeKrEt" isn't equal to "ToP SeKrEt\n"