How to prevent putty window from closing during ssh
Prevent Putty windows from closing during ssh sessions to view the error messages on the server side.
By default, the putty windows will close during ssh if there is any error on the server side without showing the error message as to why the session had failed. To ensure that the ssh session windows do not close and to view the error message on the server side, set 'Close Window on exit' to 'Never' under the Session tab as shown below.
This is useful in troubleshooting ssh failure during ssh access to the remote ssh gateway.