Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Sat Jan 12, 2013 6:00 am 
Offline
Senior Member

Joined: Tue Sep 13, 2011 7:13 am
Posts: 67
I am using Putty and Filezilla, what I don't like is that often when I am inactive for 5-10 minutes they close connection and I have to reconnect. I would guess I need to set longer time for this somewhere on server? I found that I need to change SSH_config and add ServerAliveInterval 180 or more but I still get dissconnected?


Top
   
PostPosted: Sat Jan 12, 2013 8:21 am 
Offline
Senior Newbie

Joined: Sat Jan 12, 2013 8:17 am
Posts: 9
From my experience, Filezilla tends to do that no matter what I try on it, but with PuTTY you can try going to the connection tab and setting it to send keepalives every 30-60 seconds or so. It worked for me when I was on a connection that behaved like yours.


Top
   
PostPosted: Sun Jan 13, 2013 4:43 pm 
Offline
Senior Member
User avatar

Joined: Tue Apr 13, 2004 6:54 pm
Posts: 833
marko_roi wrote:
I am using Putty and Filezilla, what I don't like is that often when I am inactive for 5-10 minutes they close connection and I have to reconnect. I would guess I need to set longer time for this somewhere on server? I found that I need to change SSH_config and add ServerAliveInterval 180 or more but I still get dissconnected?

Sounds like your home router is disconnecting idle sessions. This is a common problem.

You can configure your ssh server to send traffic on an idle session; that normally makes the router think the session is still active and so doesn't disconnect it. ClientAliveInterval would be the setting in /etc/ssh/sshd_config.
Code:
             Sets a timeout interval in seconds after which if no data has
             been received from the client, sshd will send a message through
             the encrypted channel to request a response from the client.  The
             default is 0, indicating that these messages will not be sent to
             the client.  This option applies to protocol version 2 only.


eg "ClientAliveInterval 60" will send a message every 60 seconds (if the channel is idle) to keep it open.

Of course, restart sshd after making this change!

_________________
Rgds
Stephen
(Linux user since kernel version 0.11)


Top
   
PostPosted: Mon Jan 14, 2013 3:44 am 
Offline
Senior Member

Joined: Tue Sep 13, 2011 7:13 am
Posts: 67
ServerAlive or ClientAlive? which to set?


Top
   
PostPosted: Mon Jan 14, 2013 12:29 pm 
Offline
Senior Member
User avatar

Joined: Tue Apr 13, 2004 6:54 pm
Posts: 833
"man sshd_config"

_________________
Rgds

Stephen

(Linux user since kernel version 0.11)


Top
   
PostPosted: Tue Jan 15, 2013 4:29 pm 
Offline
Senior Member

Joined: Tue Sep 13, 2011 7:13 am
Posts: 67
I know but there is both client and server side alive interval, wondering which would help for this to work, I can put both.

Edit, I tried
ServerAliveInterval 150
ServerAliveCountMax 10

But seems that this doesnt even exsist. So ClientAliveInterval should be set.


Top
   
PostPosted: Wed Jan 16, 2013 5:24 am 
Offline
Senior Member

Joined: Sun Mar 07, 2010 7:47 pm
Posts: 1970
Website: http://www.rwky.net
Location: Earth
Something like
Code:
        ClientAliveInterval 15  
        ClientAliveCountMax 4


In your sshd_config file should do, that will send data to the client every 15 seconds and disconnect after 4 failures.

The ServerAlive versions you can put client side but don't apply to putty. (There probably is an option for something similar somewhere).

_________________
Paid support
How to ask for help
1. Give details of your problem
2. Post any errors
3. Post relevant logs.
4. Don't hide details i.e. your domain, it just makes things harder
5. Be polite or you'll be eaten by a grue


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


Who is online

Users browsing this forum: No registered users and 1 guest


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