Redhat server is not connected via putty

i have a redhat linux 5.3 machine.

i can ping that machine remotely from my laptop.

but when i connect that server via putty after providing username and password there is wait for some minutes and then i get error message

"server unexpectedly closed network connection"

Please guide me to resolve.

As always check /var/log/messages for errors, but for authentication-specific errors, you can check /var/log/secure for a log entry around the time of a login attempt.

You can check these files if you can get console onto the machine, if that's not possible, you may have to reboot it, then boot into single user mode and check them. Failing that, boot into rescue mode from the installation DVD. (Type "linux rescue" at the "boot: " prompt) once you can see the the log files you'll see what's going on.

Chances are it's an issue with the PAM stack (after validating your credentials, really the only thing it does is run the PAM session modules then spawn your shell). Since I can't imagine BASH doing that to you, that narrows it down.

Do you know if you did any work on the PAM stack recently? Also, are the credentials you're using dependent on some sort of daemon (like with winbind)? I know sometimes I would see similar behavior and restarting the winbind daemon resolved the issue (3.5 winbind is barely production ready, which is why people are so interested in version 4 coming out soon).

Hi,

Is your network configured correctly.

How are you trying to connect is it via telnet or ssh. Please ensure that the service you are using is up and running. Also have a look at the logs. If you are tying to connect via ssh ( assuming ssh is running ) as root , ensure PermitRootLogin in /etc/ssh/sshd_config is set to yes.

Logs /var/log/messages and secure are the best place to look for.