Linode Forum Index Linode Forum
Linode Community Forums
 


KiTTY SSH Freezing on No Activity

Click here to go to the original topic
Goto page 1, 2  Next
 
       Linode Forum Index -> General Discussion
Author Message
JFlame



Joined: 07 Nov 2011
Posts: 21

Posted: Wed Nov 30, 2011 12:00 am    Post subject: KiTTY SSH Freezing on No Activity  

I'm not sure if this is an issue or a setting or what, but my SSH sessions into the Linode from my Windows 7 machine will freeze after very little 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.
Back to top  
retrograde inversion



Joined: 08 Jun 2011
Posts: 25

Posted: Wed Nov 30, 2011 12:10 am    Post subject:  

I've found the following settings to work well for me serverside. In /etc/ssh/sshd_config:
Code: TCPKeepAlive yes
ClientAliveInterval 120
ClientAliveCountMax 3

There may be a counterpart ServerAliveInterval or something similarly named that you can set in KiTTY as well.
Back to top  
JFlame



Joined: 07 Nov 2011
Posts: 21

Posted: Wed Nov 30, 2011 2:45 pm    Post subject:  

retrograde inversion wrote: I've found the following settings to work well for me serverside. In /etc/ssh/sshd_config:
Code: 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.
Back to top  
JFlame



Joined: 07 Nov 2011
Posts: 21

Posted: Wed Nov 30, 2011 5:05 pm    Post subject:  

Forget my previous post. I looked up those params, they're valid. I've set them, we'll see if that helps.
Back to top  
JFlame



Joined: 07 Nov 2011
Posts: 21

Posted: Wed Nov 30, 2011 9:25 pm    Post subject:  

The new ssh params don't seem to have done squat.

All you Windows users, what do you use for an SSH client?
Back to top  
drpks



Joined: 20 Dec 2010
Posts: 55

Posted: Wed Nov 30, 2011 9:31 pm    Post subject:  

PuTTY: http://www.chiark.greenend.org.uk/~sgtatham/putty/
Back to top  
JFlame



Joined: 07 Nov 2011
Posts: 21

Posted: Thu Dec 01, 2011 12:15 am    Post subject:  

drpks wrote: PuTTY: http://www.chiark.greenend.org.uk/~sgtatham/putty/

KiTTY is the successor to PuTTY. Both exhibit the same behavior for me.
Back to top  
waldo



Joined: 21 May 2009
Posts: 336

Posted: Thu Dec 01, 2011 2:10 am    Post subject:  

Successor or cheap knock-off, er I mean "fork"?

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.
Back to top  
db3l



Joined: 13 May 2009
Posts: 556

Posted: Thu Dec 01, 2011 3:05 am    Post subject:  

JFlame wrote: 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.

Quote: 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
Back to top  
JFlame



Joined: 07 Nov 2011
Posts: 21

Posted: Thu Dec 01, 2011 9:46 am    Post subject:  

Just to be sure, after I edited the ssh config file, I did a:

service ssh restart

Is that good enough to trigger the new settings?
Back to top  
JFlame



Joined: 07 Nov 2011
Posts: 21

Posted: Fri Dec 09, 2011 2:14 pm    Post subject:  

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?
Back to top  
hawk7000



Joined: 10 Dec 2010
Posts: 95

Posted: Fri Dec 09, 2011 2:26 pm    Post subject:  

JFlame wrote: 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.
Back to top  
JFlame



Joined: 07 Nov 2011
Posts: 21

Posted: Fri Dec 09, 2011 2:31 pm    Post subject:  

Tried ssh as a different user, same results.
Back to top  
JFlame



Joined: 07 Nov 2011
Posts: 21

Posted: Fri Dec 09, 2011 2:34 pm    Post subject:  

hawk7000 wrote:
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.
Back to top  
pclissold



Joined: 24 Oct 2003
Posts: 877
Location: Netherlands

Posted: Fri Dec 09, 2011 3:29 pm    Post subject:  

JFlame wrote: 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).
Back to top  
 
       Linode Forum Index -> General Discussion Goto page 1, 2  Next
Page 1 of 2