I am running RHEL5 and can't get ssh to work with NIS.<br><br>I get the error: <br>   Permission denied, please try again.<br>when I execute:<br>   ssh ilg@localhost<br><br>The error in /var/log/secure is:<br><br>   sshd[15593]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=
localhost.localdomain  user=ilg<br>   sshd[15593]: Failed password for ilg from <a href="http://127.0.0.1">127.0.0.1</a> port 1590 ssh2<br><br>The /etc/nsswitch.conf has:<br><br>   passwd: compat<br>   shadow: compat<br>   group:    compat
<br><br>and I have the appropriate "+" entries in /etc/passwd, /etc/shadow and /etc/group. I am sure it's not my NIS setup because ypcat and ypmatch all work.<br><br>I am pretty sure that the problem is that PAM is not using the NIS map files for authentication.
<br><br>The reason I say this is, when I set "UsePAM no" in /etc/ssh/sshd_config - then ssh works and I am able to login. In essence bypassing PAM.<br><span style="font-weight: bold;"><span style="font-weight: bold;">
<br></span>or</span><br><br>when I copy the login and password entries for ilg from the NIS source files to /etc/passwd and /etc/shadow, then ssh works and I am able to login. In essence bypassing NIS.<br><br>How do I make PAM use NIS?
<br><br>I am using the default /etc/pam.d files that were installed with the system.<br><br>Thanks in advance.<br>-Ian<br><br><br><br><br><br>