Skip to Content

How to prevent putty window from closing during ssh

Prevent PuTTY window from closing during an SSH session and display the error message?


Overview: This article explains how to prevent PuTTY windows from closing during an SSH session if there is any error on the server side.


By default, PuTTY window will close during an SSH session if an error occurs on the server side, without displaying the error message explaining why the session failed.

Step 1: To prevent PuTTY window from closing during an SSH session and to view the error message on the server side, set 'Close Window on exit' to 'Never' under the session tab. This is useful in troubleshooting SSH failure while accessing a remote server.


Related Articles

Connection closed by remote host in Putty

Connect jumpserver using PuTTY

function keys in htop command not working in putty

F1 - F4 keys not working in ezsh when using PuTTY