Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Nearly daily, I resume my computer to (correctly) find half a dozen or more dead PuTTY sessions left over from the previous day of administration. It's usually easier to clear my stack by closing all the inactive terminals and opening new PuTTY terminals as needed.

However, because of a modal "PuTTY Fatal Error" dialog, I am unable to bulk-close the group from the Windows taskbar. I have to manually go through each one, close the dialog, then close the window.

enter image description here

Is there a PuTTY option to disable this dialog? The titlebar appends "(Inactive)" to the ended sessions, which is good enough for me. A bonus would be still having the "Are you sure you want to close this session?" dialog, if possible.

share|improve this question

closed as off topic by Andrew, Ward, Khaled, Tom O'Connor, dunxd May 1 '13 at 11:42

Questions on Server Fault are expected to relate to professional server, networking, or related infrastructure administration within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here.If this question can be reworded to fit the rules in the help center, please edit the question.

4 Answers 4

I would log out before going home in the evening, rather than the next morning.

share|improve this answer
    
Thank you for the advice, but suggesting I leave work later than I already do doesn't really answer my question. :) FWIW, if I need to leave my computer on overnight or unattended, I do explicitly log out of my sessions, but I'm okay with a disconnect due to timeout (sleeping the computer) if I need to leave in a hurry. –  jimp Apr 30 '13 at 16:41
    
I never suggested anything about staying late. If logging out would cause you to leave work late, perhaps you have way too many windows open. –  Michael Hampton May 1 '13 at 0:11
    
Yes, I probably do. :-/ But I meant when I'm already late, there's often no time left to spare for closing browser tabs, emails, whatever. I'm really not meaning to be argumentative--just explaining it's not always practical (for me, at least) to avoid the situation although I'd like to. –  jimp May 1 '13 at 2:42
    
You're creating a massive security concern for your sheer laziness. It should only take you 30 seconds to close out your term sessions nevermind the fact you should close them as you finish with them. –  Jacob May 1 '13 at 2:48
1  
There are valid reasons for wanting this. In my case, I often have several sessions open and a vpn hiccup causes all of them to display the fatal error. I cannot close all the windows at once, I have to close each modal dialog first. (You can disable the warning before closing). –  Wyrmwood Apr 30 at 14:37

You can't really suppress these dialogs directly in Putty, I'm afraid. You can, however, work around the issue by using the command-line version of putty (plink) instead of the windowed version.

Another option would be to download the source code and either simply suppress the message or add support for a new /quiet switch that will do that (after all, putty is open source).

Edit: if you open the "WINDOWS\WIDNOWS.C" file and comment line 1111 (on my version anyway), that error message will be suppressed (not very elegant, but quick and easy). Here is the result:

/*
 * Print a message box and close the connection.
 */
void connection_fatal(void *frontend, char *fmt, ...)
{
    va_list ap;
    char *stuff, morestuff[100];

    va_start(ap, fmt);
    stuff = dupvprintf(fmt, ap);
    va_end(ap);
    sprintf(morestuff, "%.70s Fatal Error", appname);
    //MessageBox(hwnd, stuff, morestuff, MB_ICONERROR | MB_OK);
    sfree(stuff);

    if (conf_get_int(conf, CONF_close_on_exit) == FORCE_ON)
    PostQuitMessage(1);
    else {
    must_close_session = TRUE;
    }
}
share|improve this answer

To avoid this issue, I am using a Linux server as a jump point. Here I run screen or tmux and all remote connections I am creating from screen or tmux. If the server has byobu package, I preffer to start screen or tmux from byobu.

share|improve this answer

No, this is the server killing your connection because you were idle. You could prevent this by sending keepalives, perhaps once every hour (3600 seconds)

enter image description here

share|improve this answer
2  
Actually, if your Internet connection resets during the evening, it will cause the exact same situation.. –  NickW Apr 30 '13 at 15:14
    
Thanks for the answer. I have keepalives enabled. The disconnect happens because I sometimes have to sleep my computer before disconnecting each session explicitly (often half a dozen or more with my work). I was just hoping for a way to disable the dialog that is intrusively telling me the information I already know. –  jimp Apr 30 '13 at 16:44

Not the answer you're looking for? Browse other questions tagged or ask your own question.