Results 1 to 7 of 7

Thread: Terminal session timeout

  1. #1
    Join Date
    May 2008
    Beans
    18

    Terminal session timeout

    I have several Ubuntu 8.04 servers. One of them will time out my SSH terminal session in 10 or 15 minutes. None of my other servers do this and they are all setup the same way. Is there a way to stop it from timing out my sessions??

    Thanks,
    Tony

  2. #2
    Join Date
    Aug 2007
    Location
    Manchester, UK
    Beans
    10,285
    Distro
    Ubuntu

    Re: Terminal session timeout

    Try creating the file .ssh/config and putting something like this in

    Code:
    host tatooine
    	Hostname 			myserver.com
    	User	 			myuser
    	Port				1234
            ServerAliveCountMax		30
            ServerAliveInterval		120
    The last 2 are the most important to note, they determine how long the ssh client should keep the connection open.

  3. #3
    Join Date
    May 2008
    Beans
    18

    Re: Terminal session timeout

    Quote Originally Posted by Joeb454 View Post
    Try creating the file .ssh/config and putting something like this in

    Code:
    host tatooine
    	Hostname 			myserver.com
    	User	 			myuser
    	Port				1234
            ServerAliveCountMax		30
            ServerAliveInterval		120
    The last 2 are the most important to note, they determine how long the ssh client should keep the connection open.
    I'm under the impression that the above combination will keep the connection active for 1 hour (30 X 120 seconds) is this correct?

    Also it appears that there is a global setting for ssh located in the /etc/ssh/ssh_config file. I added the keep alive numbers you mentioned above to that file and restarted ssh (/etc/init.d/ssh restart) we'll see if that works.

    Thanks for your help.

  4. #4
    Join Date
    May 2008
    Beans
    18

    Re: Terminal session timeout

    Ok, that didn't fix it..... any more ideas??

    Tony

  5. #5
    Join Date
    May 2008
    Beans
    18

    Re: Terminal session timeout

    Any one have any more ideas?

  6. #6
    Join Date
    Apr 2007
    Beans
    Hidden!

    Re: Terminal session timeout

    Looking at the same problem here. I have a feeling it's something on the server side... still haven't found anything that's helped.

  7. #7
    Join Date
    Jun 2006
    Location
    Brisbane Australia
    Beans
    713

    Re: Terminal session timeout

    Quote Originally Posted by RHAnthony View Post
    Looking at the same problem here. I have a feeling it's something on the server side... still haven't found anything that's helped.
    Note you are in a very old thread.

    95% of the time this ssh "hanging" problem is due to the NAT table overflowing in a router, usually your cheap home router. You fix it for yourself by setting ServerAliveInterval in your ~/ssh/config, or set ClientAliveInterval in your sshd server to fix it for everybody.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •