PuTTY fatal error: Server refused to start a shell/command
I've always used PuTTY (win32) in order to access my servers through SSH. Yesterday I upgraded OpenSSH on my server from 4.3 to 5.8 and it seems that PuTTY doesn't work now. It asks for a password, then confirms that the password is correct, and then gives the fatal error Server refused to start a shell/command
.
When I try to log on with cygwin's OpenSSH, I have no problems.
Solution 1:
The problem was a shortage of RAM.
Solution 2:
It sounds like something in your putty configs is requesting a specific shell after login that is no longer approved. Try creating a new session instead of your saved one and input as few settings as possible, just the host and any authentication details. That should get you in. Then if you want to fix your previous saved session look through the settings for bits about remote command, preferred shell, etc.
Solution 3:
For users who encounter this issue: You can resolve this by killing the session of one of the users using
pkill -KILL -u username
NB: I used root access, since it was logging in successfully
Solution 4:
You probably have the "remote command" set under the SSH settings in the putty config. Just remove this setting and try again.
Solution 5:
I know it's an old thread, but as I had this issue and I came across these answers but... I could only fix it by updating PuTTY's version to 0.70. That was the only thing that worked for me. Cheers!