Solved

SSH disconnects after a certain time.

Posted on 2007-11-19
10
1,752 Views
Last Modified: 2013-12-27
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
0
Comment
Question by:simpsonjr
  • 6
  • 4
10 Comments
 
LVL 48

Expert Comment

by:Tintin
ID: 20314791
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.

0
 
LVL 48

Expert Comment

by:Tintin
ID: 20314806
3.  Related to 1, there's the KeepAlive option in /etc/sshd/sshd_config
0
 

Author Comment

by:simpsonjr
ID: 20315263
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..  



0
Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

 
LVL 48

Expert Comment

by:Tintin
ID: 20315305
What about points 1 and 2?
0
 

Author Comment

by:simpsonjr
ID: 20315350
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.  

0
 
LVL 48

Expert Comment

by:Tintin
ID: 20315375
From the shell prompt, type

echo $TMOUT
0
 

Author Comment

by:simpsonjr
ID: 20315435
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.  

 
 
0
 
LVL 48

Accepted Solution

by:
Tintin earned 250 total points
ID: 20315504
In putty, if you go to the Connections menu and put a value (say 30) in "Seconds between keepalives", does it make any difference?
0
 

Author Comment

by:simpsonjr
ID: 20315935
That worked for Putty.  What about my OSX Terminal?  
0
 
LVL 48

Expert Comment

by:Tintin
ID: 20317274
Not familiar with OSX terminal.
0

Featured Post

Active Directory Webinar

We all know we need to protect and secure our privileges, but where to start? Join Experts Exchange and ManageEngine on Tuesday, April 11, 2017 10:00 AM PDT to learn how to track and secure privileged users in Active Directory.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Raspberry Pi SSH/Putty login scripts, which 1 87
Showing a username in UNIX and using that name in the script 4 50
winscp where are logs stored 3 52
lunix and unix command 21 87
Let's say you need to move the data of a file system from one partition to another. This generally involves dismounting the file system, backing it up to tapes, and restoring it to a new partition. You may also copy the file system from one place to…
Why Shell Scripting? Shell scripting is a powerful method of accessing UNIX systems and it is very flexible. Shell scripts are required when we want to execute a sequence of commands in Unix flavored operating systems. “Shell” is the command line i…
Viewers will learn how to properly install and use Secure Shell (SSH) to work on projects or homework remotely. Download Secure Shell: Follow basic installation instructions: Open Secure Shell and use "Quick Connect" to enter credentials includi…
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.

831 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question