ssh timeout value

shadowfax

Registered
Hi,

I use ssh to connect to my school server; however, after about 5 minutes of inactivity, this is the message I get:

Read from remote host xxx.xxx.xxx: Connection reset by peer
Connection to xxx.xxx.xxx closed.

And I was wondering if there is a way to keep the connection even without activity for a long while.

Thanx in advance.
 
In the sshd config file on the server running sshd, uncomment or add the following line:
Code:
KeepAlive yes
This will allow sshd to re-establish a connection if it drops for a few secs - offten thats what terminates a ssh session.

On my SGI, that file is in /etc/ssh/sshd_config
 
Thanx, I have asked numerous people about this, and you are the only that had given me a straight answer to remedy this problem.

Once again, thank you!
 
It seems like even though I uncomment

keepalive yes

in the sshd_config file, my connect is still dropping. Any ideas?

thanx
 
You said you're sshing to a server at school, you updated the sshd_config file on the school's server, or on your local box? This has to be done on the schools server side, most of the time its' put in place as a security feature as they don't want people to have connections left open.

Brian
 
I don't have the permission rights to go into sshd_config

To make the long story short, before I bought my PB, I use my PC to ssh into my school's server and I was using putty to ssh in.
What I realize was that in putty, no matter how long the inactivity period was, I was still connected unless the server crash.

So, since I didn't have to edit sshd_config for the connection to stay alive, there should be a way to keep my connection alive in a shell or is this a windows vs. unix thing?...

thanx
 
Back
Top