Bringing ssh connections back to life after hibernation - SSH

This is a discussion on Bringing ssh connections back to life after hibernation - SSH ; In my setup I sometimes have to put my computer to hibernate when I have one or more ssh (OpenSSH, in fact) connections to remote hosts. My hibernate setup is such that when I bring my computer back to life ...

+ Reply to Thread
Results 1 to 6 of 6

Thread: Bringing ssh connections back to life after hibernation

  1. Bringing ssh connections back to life after hibernation

    In my setup I sometimes have to put my computer to hibernate when I have
    one or more ssh (OpenSSH, in fact) connections to remote hosts. My
    hibernate setup is such that when I bring my computer back to life the
    network is up and running immediately. However, my ssh connections to
    remote hosts take some 10-15 minutes to revive.

    Anybody know why that should be the case? Anybody know if there is some
    OpenSSH configuration parameter that would get the ssh connections back to
    life quickly?



  2. Re: Bringing ssh connections back to life after hibernation

    Augustus SFX van Dusen writes:

    > In my setup I sometimes have to put my computer to hibernate when I have
    >one or more ssh (OpenSSH, in fact) connections to remote hosts. My
    >hibernate setup is such that when I bring my computer back to life the
    >network is up and running immediately. However, my ssh connections to
    >remote hosts take some 10-15 minutes to revive.


    > Anybody know why that should be the case? Anybody know if there is some
    >OpenSSH configuration parameter that would get the ssh connections back to
    >life quickly?


    I hae the same problem when my network goes down for a while (ISP problems)
    I sometimes find that opening a new ssh to the same host revives teh old
    one. Not sure where the problem is-- whetehr it is a long timeout in the
    local or in the remote ssh.(It has never been 15 min, but that may depend
    on the length of the down time)




  3. Re: Bringing ssh connections back to life after hibernation

    On Sun, 24 Sep 2006 23:21:39 +0000, Unruh wrote:

    > Augustus SFX van Dusen writes:
    >
    >> In my setup I sometimes have to put my computer to hibernate when I have
    >>one or more ssh (OpenSSH, in fact) connections to remote hosts. My
    >>hibernate setup is such that when I bring my computer back to life the
    >>network is up and running immediately. However, my ssh connections to
    >>remote hosts take some 10-15 minutes to revive.

    >
    >> Anybody know why that should be the case? Anybody know if there is some
    >>OpenSSH configuration parameter that would get the ssh connections back
    >>to life quickly?

    >
    > I hae the same problem when my network goes down for a while (ISP
    > problems) I sometimes find that opening a new ssh to the same host revives
    > teh old one. Not sure where the problem is-- whetehr it is a long timeout
    > in the local or in the remote ssh.(It has never been 15 min, but that may
    > depend on the length of the down time)


    For what it's worth, I think I have found a solution to my problem
    (not for the first time immediately after asking for a answer to some
    question in the net either). If in my /etc/ssh/ssh_config I enter the
    lines

    ServerAliveCountMax 1
    ServerAliveInterval 10

    then my connections seem to come back quickly enough after reviving my
    computer.



  4. Re: Bringing ssh connections back to life after hibernation

    Augustus SFX van Dusen writes:

    >On Sun, 24 Sep 2006 23:21:39 +0000, Unruh wrote:


    >> Augustus SFX van Dusen writes:
    >>
    >>> In my setup I sometimes have to put my computer to hibernate when I have
    >>>one or more ssh (OpenSSH, in fact) connections to remote hosts. My
    >>>hibernate setup is such that when I bring my computer back to life the
    >>>network is up and running immediately. However, my ssh connections to
    >>>remote hosts take some 10-15 minutes to revive.

    >>
    >>> Anybody know why that should be the case? Anybody know if there is some
    >>>OpenSSH configuration parameter that would get the ssh connections back
    >>>to life quickly?

    >>
    >> I hae the same problem when my network goes down for a while (ISP
    >> problems) I sometimes find that opening a new ssh to the same host revives
    >> teh old one. Not sure where the problem is-- whetehr it is a long timeout
    >> in the local or in the remote ssh.(It has never been 15 min, but that may
    >> depend on the length of the down time)


    > For what it's worth, I think I have found a solution to my problem
    >(not for the first time immediately after asking for a answer to some
    >question in the net either). If in my /etc/ssh/ssh_config I enter the
    >lines


    > ServerAliveCountMax 1
    > ServerAliveInterval 10


    While the latter looks useful, the former seems counterproductive, at least
    in my situations. Ie, it says that if once the server does not respond to
    the ServerAlive message, you are disconnected. That seems pretty harsh.


    >then my connections seem to come back quickly enough after reviving my
    >computer.




  5. Re: Bringing ssh connections back to life after hibernation

    On Mon, 25 Sep 2006 16:57:51 +0000, Unruh wrote:

    > Augustus SFX van Dusen writes:
    >
    >>On Sun, 24 Sep 2006 23:21:39 +0000, Unruh wrote:

    >
    >>> Augustus SFX van Dusen writes:
    >>>
    >>>> In my setup I sometimes have to put my computer to hibernate when I
    >>>> have
    >>>>one or more ssh (OpenSSH, in fact) connections to remote hosts. My
    >>>>hibernate setup is such that when I bring my computer back to life the
    >>>>network is up and running immediately. However, my ssh connections to
    >>>>remote hosts take some 10-15 minutes to revive.
    >>>
    >>>> Anybody know why that should be the case? Anybody know if there is
    >>>> some
    >>>>OpenSSH configuration parameter that would get the ssh connections back
    >>>>to life quickly?
    >>>
    >>> I hae the same problem when my network goes down for a while (ISP
    >>> problems) I sometimes find that opening a new ssh to the same host
    >>> revives teh old one. Not sure where the problem is-- whetehr it is a
    >>> long timeout in the local or in the remote ssh.(It has never been 15
    >>> min, but that may depend on the length of the down time)

    >
    >> For what it's worth, I think I have found a solution to my problem
    >>(not for the first time immediately after asking for a answer to some
    >>question in the net either). If in my /etc/ssh/ssh_config I enter the
    >>lines

    >
    >> ServerAliveCountMax 1
    >> ServerAliveInterval 10

    >
    > While the latter looks useful, the former seems counterproductive, at
    > least in my situations. Ie, it says that if once the server does not
    > respond to the ServerAlive message, you are disconnected. That seems
    > pretty harsh.


    I guess it is. I use a combination of autossh and screen though, which
    so far seems to work fine with such settings.


    >
    >>then my connections seem to come back quickly enough after reviving my
    >>computer.



  6. Re: Bringing ssh connections back to life after hibernation

    In comp.security.ssh Unruh :
    > Augustus SFX van Dusen writes:


    >>On Sun, 24 Sep 2006 23:21:39 +0000, Unruh wrote:


    >>> Augustus SFX van Dusen writes:


    >>>> In my setup I sometimes have to put my computer to hibernate when I have
    >>>>one or more ssh (OpenSSH, in fact) connections to remote hosts. My
    >>>>hibernate setup is such that when I bring my computer back to life the
    >>>>network is up and running immediately. However, my ssh connections to
    >>>>remote hosts take some 10-15 minutes to revive.


    >>>> Anybody know why that should be the case? Anybody know if there is some
    >>>>OpenSSH configuration parameter that would get the ssh connections back
    >>>>to life quickly?


    >>> I hae the same problem when my network goes down for a while (ISP
    >>> problems) I sometimes find that opening a new ssh to the same host revives
    >>> teh old one. Not sure where the problem is-- whetehr it is a long timeout
    >>> in the local or in the remote ssh.(It has never been 15 min, but that may
    >>> depend on the length of the down time)


    Mostly a ssh connection can survive such thing easily with static
    IP, if you just keep the xterm with the login open. YMMV

    >> For what it's worth, I think I have found a solution to my problem
    >>(not for the first time immediately after asking for a answer to some
    >>question in the net either). If in my /etc/ssh/ssh_config I enter the
    >>lines


    >> ServerAliveCountMax 1
    >> ServerAliveInterval 10


    > While the latter looks useful, the former seems counterproductive, at least
    > in my situations. Ie, it says that if once the server does not respond to
    > the ServerAlive message, you are disconnected. That seems pretty harsh.


    The above would disconnect the unresponsive session 10 seconds
    after the first packet got no answer as per client side
    configuration.

    Indeed this is more useful on the sshd side to stop firewalls
    from automatic disconnecting idle sessions there are far better
    ways to do this then a firewall could. but although to let sshd
    disconnect broken sessions cleanly, without "filling" up utmp an
    associated tools with ghost logins.

    ClientAliveCountMax
    ClientAliveInterval

    Default of the later is zero, disabling sending messages to the
    client at all.

    --
    Michael Heiming (X-PGP-Sig > GPG-Key ID: EDD27B94)
    mail: echo zvpunry@urvzvat.qr | perl -pe 'y/a-z/n-za-m/'
    #bofh excuse 225: It's those computer people in X {city
    of world}. They keep stuffing things up.

+ Reply to Thread