Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

connection timing out

  • 09-07-2012 10:31AM
    #1
    Registered Users, Registered Users 2 Posts: 966 ✭✭✭


    A bit of a noob question.

    I have a letshost VPS (running Ubuntu 11.10) that I am using to learn about web programming. My problem is that if a terminal is left inactive for about 10 minutes it disconnects, which is annoying as I like to keep 3 or 4 shells
    open, but some of them I only need to use infrequently. I know that this
    is not a problem with my ssh client as I don't experience this problem on
    other servers. Is this something that I can easily fix - is there some setting
    that determines how long a shell can be inactive for?


Comments

  • Registered Users, Registered Users 2 Posts: 33 Giuseppe90


    What are you using to connect ? If you are connecting from a linux box you could add the following to your /etc/ssh/ssh_config

    ServerAliveInterval 60

    This will send a message to the server if no data has been received in 60 seconds and should keep your connection active


  • Registered Users, Registered Users 2 Posts: 966 ✭✭✭equivariant


    Giuseppe90 wrote: »
    What are you using to connect ? If you are connecting from a linux box you could add the following to your /etc/ssh/ssh_config

    ServerAliveInterval 60

    This will send a message to the server if no data has been received in 60 seconds and should keep your connection active

    Thanks.
    Sometimes I connect from a linux box, sometimes using putty on my w*****s laptop


  • Registered Users, Registered Users 2 Posts: 33 Giuseppe90


    In the "Connection" section of your putty settings there should be an option to send null packets - change that from 0 to 60 and that should do it. You will need to do that and save for each session you have saved.

    Hope that helps :)


  • Registered Users, Registered Users 2 Posts: 966 ✭✭✭equivariant


    Giuseppe90 wrote: »
    What are you using to connect ? If you are connecting from a linux box you could add the following to your /etc/ssh/ssh_config

    ServerAliveInterval 60

    This will send a message to the server if no data has been received in 60 seconds and should keep your connection active

    Actually I just realised that if I put

    ClientAliveInterval 60

    in sshd_config on the server then this sorts the problem from the server side, so I don't have to configure the clients individually


Advertisement