Prevent Putty's "Are you sure you want to close this session" popup?

Solution 1:

Use this option on the Window -> Behaviour page

enter image description here

and don't forget to save this as Default Settings on the Session page to make it permanent.

Solution 2:

As @mpy correctly answered, go to Window > Behavior > Warn before closing window.


Alternatively, particularly if you are keyboard-centric, use Ctrl+D keyboard shortcut. On *nix systems, it's an equivalent of logout command and will take your PuTTY window with it (if Close window on exit is set to its default value of Only on clean exit).