Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Wed Nov 30, 2011 1:00 am 
Offline
Junior Member

Joined: Mon Nov 07, 2011 9:18 am
Posts: 22
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.


Top
   
 Post subject:
PostPosted: Wed Nov 30, 2011 1:10 am 
Offline
Senior Member

Joined: Wed Jun 08, 2011 11:25 pm
Posts: 51
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.


Top
   
 Post subject:
PostPosted: Wed Nov 30, 2011 3:45 pm 
Offline
Junior Member

Joined: Mon Nov 07, 2011 9:18 am
Posts: 22
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.


Top
   
 Post subject:
PostPosted: Wed Nov 30, 2011 6:05 pm 
Offline
Junior Member

Joined: Mon Nov 07, 2011 9:18 am
Posts: 22
Forget my previous post. I looked up those params, they're valid. I've set them, we'll see if that helps.


Top
   
 Post subject:
PostPosted: Wed Nov 30, 2011 10:25 pm 
Offline
Junior Member

Joined: Mon Nov 07, 2011 9:18 am
Posts: 22
The new ssh params don't seem to have done squat.

All you Windows users, what do you use for an SSH client?


Top
   
 Post subject:
PostPosted: Wed Nov 30, 2011 10:31 pm 
Offline
Senior Member

Joined: Mon Dec 20, 2010 11:37 pm
Posts: 76
PuTTY: http://www.chiark.greenend.org.uk/~sgtatham/putty/


Top
   
 Post subject:
PostPosted: Thu Dec 01, 2011 1:15 am 
Offline
Junior Member

Joined: Mon Nov 07, 2011 9:18 am
Posts: 22
drpks wrote:


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


Top
   
 Post subject:
PostPosted: Thu Dec 01, 2011 3:10 am 
Offline
Senior Member

Joined: Thu May 21, 2009 3:19 am
Posts: 336
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.


Top
   
 Post subject:
PostPosted: Thu Dec 01, 2011 4:05 am 
Offline
Senior Member

Joined: Wed May 13, 2009 1:18 am
Posts: 681
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


Top
   
 Post subject:
PostPosted: Thu Dec 01, 2011 10:46 am 
Offline
Junior Member

Joined: Mon Nov 07, 2011 9:18 am
Posts: 22
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?


Top
   
 Post subject:
PostPosted: Fri Dec 09, 2011 3:14 pm 
Offline
Junior Member

Joined: Mon Nov 07, 2011 9:18 am
Posts: 22
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?


Top
   
 Post subject:
PostPosted: Fri Dec 09, 2011 3:26 pm 
Offline
Senior Member

Joined: Fri Dec 10, 2010 6:21 am
Posts: 144
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.


Top
   
 Post subject:
PostPosted: Fri Dec 09, 2011 3:31 pm 
Offline
Junior Member

Joined: Mon Nov 07, 2011 9:18 am
Posts: 22
Tried ssh as a different user, same results.


Top
   
 Post subject:
PostPosted: Fri Dec 09, 2011 3:34 pm 
Offline
Junior Member

Joined: Mon Nov 07, 2011 9:18 am
Posts: 22
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.


Top
   
 Post subject:
PostPosted: Fri Dec 09, 2011 4:29 pm 
Offline
Senior Member
User avatar

Joined: Fri Oct 24, 2003 3:51 pm
Posts: 965
Location: Netherlands
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).

_________________
/ Peter


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 7 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group