KiTTY SSH Freezing on No Activity
I'll switch away from the SSH window momentarily to do something and when I come back (maybe a minute later) the SSH session will be hung, and if I bang enough keys KiTTY will tell me that "The software caused a connection abort."
I have no idea where to start with this. If anybody knows please advise. It's very annoying, and I'm finding the SSH sessions are piling up and must be killed on the Linode.
15 Replies
TCPKeepAlive yes
ClientAliveInterval 120
ClientAliveCountMax 3
There may be a counterpart ServerAliveInterval or something similarly named that you can set in KiTTY as well.
@retrograde inversion:
I've found the following settings to work well for me serverside. In /etc/ssh/sshd_config:
TCPKeepAlive yes ClientAliveInterval 120 ClientAliveCountMax 3
There may be a counterpart ServerAliveInterval or something similarly named that you can set in KiTTY as well.
I took a look and ClientAliveInterval and ClientAliveCountMax are not currently referenced anywhere in my sshd_config. Should I just try adding these? Usually most config files will have valid options commented out, or so I've seen.
All you Windows users, what do you use for an SSH client?
@drpks:
PuTTY:
http://www.chiark.greenend.org.uk/~sgtatham/putty/
KiTTY is the successor to PuTTY. Both exhibit the same behavior for me.
I've been using PuTTY since 0.48 and have had no problem on any version of Windows from 98 through Win 7, including this very second running 0.61 of PuTTY on Win7, XP and Win 2008 server.
I can leave my SSH session up with PuTTY connected to my node for weeks or longer if one of the machines are not rebooted in that time frame.
I wonder if KiTTY has some bad default setting. Try editing your registry and deleting HKCU\Software\SimonTatham then try PuTTY again. If that works, the problem is KiTTY. If that doesn't work, delete the registry key again and try KiTTY if that registry key is created again, then uninstall KiTTY, delete that key and figure out what the developer who felt he needed to fork perfectly good working software has screwed up.
I'm sorry, but the more I browse the KiTTY website, the less I'd trust anything coming from that site or "developer". Everything just feels and looks cheap and hinky to me.
@JFlame:
The new ssh params don't seem to have done squat.
One thought - are you configured to use version 2 of the protocol? I think in my PuTTY (which I just have around for occasional use, so it's probably an ancient version), the default SSH setting prefers protocol version 1, so maybe KiTTY inherited that. The server side keepalive stuff only works with 2.
From your original problem report it really does sound like an intermediate firewall that is timing out the connection which the keepalives, if working, should prevent.
> All you Windows users, what do you use for an SSH client?
To be honest, the same SSH (OpenSSH) as on Linux, via Cygwin.
– David
service ssh restart
Is that good enough to trigger the new settings?
The SSH sessions will freeze after probably a minute of being left idle. I've tried all that is suggested in this thread. The functionality is the same from both PuTTY and KiTTY, and happens from different internet connections, some behind a firewall, some not.
Are there any logs I can look at on the server side?
@JFlame:
Just an update. I still haven't seen any improvement in this.
The SSH sessions will freeze after probably a minute of being left idle. I've tried all that is suggested in this thread. The functionality is the same from both PuTTY and KiTTY, and happens from different internet connections, some behind a firewall, some not.
Are there any logs I can look at on the server side?
Fwiw, if I were to guess, I'd say the problem most likely isn't caused by either the client software or the server software. Rather I would guess you have a firewall/NAT "router" or something in your path that kills idle TCP connections (probably close to your end).
If that is the case, however, enabling the keepalive functionality should help. Did you restart sshd after modifying sshd_config?
Iirc there are keepalive settings in Putty as well that you could fiddle with.
@hawk7000:
If that is the case, however, enabling the keepalive functionality should help. Did you restart sshd after modifying sshd_config?
Iirc there are keepalive settings in Putty as well that you could fiddle with.
Restarted the whole box actually.
Where are the settings in Putty? I can't seem to find them.
@JFlame:
Where are the settings in Putty? I can't seem to find them.
In the main 'Connection' pane under 'Low-level TCP connection options': check 'Enable TCP keepalives' (SO_KEEPALIVE option).
@pclissold:
@JFlame:Where are the settings in Putty? I can't seem to find them.
In the main 'Connection' pane under 'Low-level TCP connection options': check 'Enable TCP keepalives' (SO_KEEPALIVE option).
Finally! This has solved my issue. Many thanks!