I,ve installed openldap 2.1.25 on a Debian 3.0 in order to authenticate
the users with PAM.
I configured all the services (proftpd, su, passwd ,etc) in order to use
PAM to access the ldap server and they work properly. When I try using ssh:
- If the user is in /etc/passwd: ssh asks for password and then closes
the connection:
#ssh -l admin 10.0.0.80
admin@10.0.0.80's password:
Connection closed by 10.0.0.80
- If the user is in the ldap: ssh closes the connection directly:
#ssh -l testldap 10.0.0.80
Connection closed by 10.0.0.80
- When I stop the ldap then I con login via ssh as a /etc/passwd user
without problems.

I configured sshd_config to use PAM:
#Privilege Separation is turned on for security
#UsePrivilegeSeparation yes
UsePrivilegeSeparation no

# ...but breaks Pam auth via kbdint, so we have to turn it off
# Use PAM authentication via keyboard-interactive so PAM modules can
# properly interface with the user (off due to PrivSep)
PAMAuthenticationViaKbdInt yes