Link to home
Start Free TrialLog in
Avatar of simpsonjr
simpsonjr

asked on

SSH disconnects after a certain time.

When I start a ssh session with one of my server, if I am not active for 60 sec it automatically time out.  

1. Where is configure?  
2. How do I stop it form timing out.  

Thanks
Avatar of Tintin
Tintin

A few possibilities.

1.  There is a firewall dropping connections idle for >=1 min.  In which case, you either need to use a client keepalive (putty has this option), or possibly TCP keepalives on the server side.

2.  Your shell (ksh/bash) has the TMOUT environment variable set to 60, which causes your login session to log out if you are idle for more than 60 seconds *and* you are at the shell prompt.

3.  Related to 1, there's the KeepAlive option in /etc/sshd/sshd_config
Avatar of simpsonjr

ASKER

There is a KeepAlive setting in the sshd_config.  

It currently is set:

 KeepAlive yes

It is set to yes on server that are not booting me out as well..  



What about points 1 and 2?
There is no firewall dropping the connection.  

and  

#Your shell (ksh/bash) has the TMOUT environment variable set to 60, which causes your login session to #log out if you are idle for more than 60 seconds *and* you are at the shell prompt

I don't even know how to check this.  

From the shell prompt, type

echo $TMOUT
I get nothing when I run that command.  

Here is another twist in the puzzle.  When I ssh from another Solaris server, I don't get booted.  But every client I use does.  

The clients I am using are Putty and the terminal in OSX.  

 
 
ASKER CERTIFIED SOLUTION
Avatar of Tintin
Tintin

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
That worked for Putty.  What about my OSX Terminal?  
Not familiar with OSX terminal.