# how to disable ssh automatic logout

## web_angel_tr

Hi,

i am new to gentoo but i had similar problems with redhat. I would like to disable automatic logout when i log in onto another machine with ssh.

i remember there was a switch 'protokolKeepAlive' which can be set to true inside ssh.conf so the connection is kept alive even if i don't type something for over 30 minutes. For some reason this is not working and ssh tells me that it don't know this switch.

The obvious solution would be to install it on my own from the source package (which will work fine as it did under redhat) but i would like to stick to emerge.

So is there a USE flag or something i miss to turn on this switch inside ssh.conf or maybe another way???

Thanx for any help and suggestions

----------

## rtn

ssh doesn't close connections on its own, generally auto-logout if a part of your

login shell.  If you're using bash or ksh, look for an environment variable called

TMOUT, if you're using csh/tcsh, look for `set autologout`.

--rtn

----------

## web_angel_tr

Hi,

i am using bash but have no such environment variable set.

----------

## rtn

Did you check your local shell or the remote shell?  It would most likely be the latter.

Is your connection timing out with a network problem?  What is the error message

when the link is closed?

--rtn

----------

## web_angel_tr

both of them. Both had nothing like the env. variable you said. 

And there is no network problem either. Message is as follows:

Read from remote host xxx.xxx.com: Connection reset by peer

Connection to xxx.xxx.com closed.

I have tried to set keepAlive to no on both machines and curiously

it looks like it's working fine now. I have a ssh session open for 45

minutes now without typing anything and i'm still connected.

----------

## Decibels

I have been running into the same problem. Trying to ssh over to my other box on the floor. After awhile, even if I am using it, the connection is closed.

**Later: Reading some more and my problem might be my firewall.

----------

