Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Thu Dec 17, 2015 4:59 pm 
Offline
Junior Member

Joined: Thu Feb 06, 2014 6:26 pm
Posts: 25
I SSH into my server from an iTerm session. I've noticed that after a certain amount of time, my session times out. This means I have to close that iTerm window which messes up my iTerm window configuration and I have to set them all up again. Is there some way I can prevent my session from timing me out or at least set it to a longer time interval like perhaps a couple of hours?

Thanks.


Top
   
PostPosted: Fri Dec 18, 2015 9:59 am 
Offline
Linode Staff

Joined: Mon Sep 29, 2014 4:47 pm
Posts: 90
Twitter: FelicianoTech
Hey,

There's 2 suggestions, and two ways to adjust timeout. My first suggestion is to not use SSH in the first place but a tool called MoSH. I use it myself and works great for this situation, changing IPs, high-latency connections, etc.

Now if you don't want to install anything else, you can adjust timeouts both server side and client side. Server side, in /etc/ssh/sshd_config you should make sure the following is set:

Code:
TCPKeepAlive yes
ClientAliveCountMax 99999
ClientAliveInterval 30


Client side, you should have the following set in ~/.ssh/config:

Code:
ServerAliveInterval 100



For both ServerAliveInterval or ClientAliveInterval, this is telling SSH how often is should poll the connection, preventing the connection from timing out. ClientAliveCountMax is how many times to poll before considering the client dead.

I hope that helps.


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


Who is online

Users browsing this forum: No registered users and 4 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