I use Amos advice: I used to get this too until I set "ServerAliveInterval" to "120" in my ssh/config.
See "man ssh_config" about this parameter. I also set the following on the server side (at least on overseas servers): TCPKeepAlive yes ClientAliveInterval 30 ClientAliveCountMax 4 And it works. Thanks a lot Amos and all of you Yahav Biran Alcatel-Lucent Deployment Eng. Mobile Content Platforms 5 Nahum Het Street, 3rd floor Topaz Building, Shaar Hacarmel POB 15049 Haifa 31905, Israel Email: [EMAIL PROTECTED] Phone: +972 4 813 8020 Fax: +972 4 813 8022 -----Original Message----- From: Cyril SCETBON [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 11, 2007 4:31 PM To: Biran, Yahav (Yahav) Cc: linux-il@cs.huji.ac.il Subject: Re: ssh timout Are you connected directly to the server ? It can be some network equipment between your host and the server that reset the connection too. Regards Biran, Yahav (Yahav) wrote: > Hi all, > when ever I connect to a linux server using ssh, the connection is timeout after less then a 3 min without interacting with the server. > > uname -a: > 2.6.9-42.ELsmp #1 SMP Wed Jul 12 23:27:17 EDT 2006 i686 athlon i386 GNU/Linux > > ssh -v: > OpenSSH_3.9p1, OpenSSL 0.9.7a Feb 19 2003 > > I was trying to add the connectionTimeout figure in my ssh (client) folder config, i.e. [EMAIL PROTECTED] ~/.ssh 31> cat config > ConnectTimeout 3000 > > I also added the same to /etc/ssh/ssh_config (unmarged the # from the ConnectTimeout and set it to 3000 (50 min). > > I added the debug mode to the client ssh command. > > [EMAIL PROTECTED] ~/prj/dmgr 39> gnoc_js1 > OpenSSH_4.7p1, OpenSSL 0.9.8e 23 Feb 2007 > debug1: Reading configuration data /cygdrive/z/.ssh/config > debug1: Connecting to 135.109.235.13 [135.109.235.13] port 22. > debug1: fd 3 clearing O_NONBLOCK > debug1: Connection established. > debug1: identity file /cygdrive/z/.ssh/identity type -1 > debug1: identity file /cygdrive/z/.ssh/id_rsa type -1 > debug1: identity file /cygdrive/z/.ssh/id_dsa type -1 > debug1: Remote protocol version 1.99, remote software version OpenSSH_3.9p1 > debug1: match: OpenSSH_3.9p1 pat OpenSSH_3.* > debug1: Enabling compatibility mode for protocol 2.0 > debug1: Local version string SSH-2.0-OpenSSH_4.7 > debug1: SSH2_MSG_KEXINIT sent > debug1: SSH2_MSG_KEXINIT received > debug1: kex: server->client aes128-cbc hmac-md5 none > debug1: kex: client->server aes128-cbc hmac-md5 none > debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent > debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP > debug1: SSH2_MSG_KEX_DH_GEX_INIT sent > debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY > debug1: Host '135.109.235.13' is known and matches the RSA host key. > debug1: Found key in /cygdrive/z/.ssh/known_hosts:72 > debug1: ssh_rsa_verify: signature correct > debug1: SSH2_MSG_NEWKEYS sent > debug1: expecting SSH2_MSG_NEWKEYS > debug1: SSH2_MSG_NEWKEYS received > debug1: SSH2_MSG_SERVICE_REQUEST sent > debug1: SSH2_MSG_SERVICE_ACCEPT received > debug1: Authentications that can continue: publickey,gssapi-with-mic,password,hostbased > debug1: Next authentication method: publickey > debug1: Trying private key: /cygdrive/z/.ssh/identity > debug1: Trying private key: /cygdrive/z/.ssh/id_rsa > debug1: Trying private key: /cygdrive/z/.ssh/id_dsa > debug1: Next authentication method: password > [EMAIL PROTECTED]'s password: > debug1: Authentication succeeded (password). > debug1: channel 0: new [client-session] > debug1: Entering interactive session. > Last login: Mon Dec 10 08:36:52 2007 from 10.200.200.21 > /usr/bin/X11/xhost: unable to open display "" > /usr/bin/X11/xhost: unable to open display "" > [EMAIL PROTECTED] /usr/local/mpower 1> > > > BUT I still face the same problem, time out after 1-2 minutes. > > > Please help > > yahav > > No virus found in this outgoing message. > Checked by AVG Free Edition. > Version: 7.5.503 / Virus Database: 269.16.17/1178 - Release Date: 12/8/2007 11:59 AM > > > =============================================================== > To unsubscribe, send mail to [EMAIL PROTECTED] with > the word "unsubscribe" in the message body, e.g., run the command > echo unsubscribe | mail [EMAIL PROTECTED] > > > -- Cyril SCETBON No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.5.503 / Virus Database: 269.16.17/1178 - Release Date: 12/8/2007 11:59 AM No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.5.503 / Virus Database: 269.16.17/1178 - Release Date: 12/8/2007 11:59 AM ================================================================= To unsubscribe, send mail to [EMAIL PROTECTED] with the word "unsubscribe" in the message body, e.g., run the command echo unsubscribe | mail [EMAIL PROTECTED]