Autorecover ssh tunnel with Putty - SSH

This is a discussion on Autorecover ssh tunnel with Putty - SSH ; Hello everybody! I'm using Putty 0.60 in Windows (at home) to establish a tunnel through the internet with an OpenSSH server. Sometimes the connection at home is broken and so is the tunnel (message Network error: Software caused connection abort). ...

+ Reply to Thread
Results 1 to 7 of 7

Thread: Autorecover ssh tunnel with Putty

  1. Autorecover ssh tunnel with Putty

    Hello everybody!

    I'm using Putty 0.60 in Windows (at home) to establish a tunnel
    through the internet with an OpenSSH server. Sometimes the connection
    at home is broken and so is the tunnel (message Network error:
    Software caused connection abort). So, until I return home and start
    again the tunnel using Putty it doesn't work.

    Does anybody know if there is any way for Putty to automatically re-
    establish the tunnel after the connection failure?

    Thanks in advance,

    Abel.

  2. Re: Autorecover ssh tunnel with Putty

    Abel wrote:
    > Hello everybody!
    >
    > I'm using Putty 0.60 in Windows (at home) to establish a tunnel
    > through the internet with an OpenSSH server. Sometimes the connection
    > at home is broken and so is the tunnel (message Network error:
    > Software caused connection abort). So, until I return home and start
    > again the tunnel using Putty it doesn't work.
    >
    > Does anybody know if there is any way for Putty to automatically re-
    > establish the tunnel after the connection failure?
    >
    > Thanks in advance,
    >
    > Abel.



    you could use a cmdline client like openssh from the free cygwin package
    and build a bash script loop around the tunnel setup.


    while true
    do
    ssh whatever... look up -R or -L option for port forwarding
    sleep 10
    done


    -> www.cygwin.com

    Joachim

  3. Re: Autorecover ssh tunnel with Putty

    On Oct 7, 1:27*pm, Joachim Gann wrote:
    > Abel wrote:
    > > Hello everybody!

    >
    > > *I'm using Putty 0.60 in Windows (at home) to establish a tunnel
    > > through the internet with an OpenSSH server. Sometimes the connection
    > > at home is broken and so is the tunnel (message Network error:
    > > Software caused connection abort). So, until I return home and start
    > > again the tunnel using Putty it doesn't work.

    >
    > > *Does anybody know if there is any way for Putty to automatically re-
    > > establish the tunnel after the connection failure?

    >
    > > * Thanks in advance,

    >
    > > * * Abel.

    >
    > you could use a cmdline client like openssh from the free cygwin package
    > and build a bash script loop around the tunnel setup.
    >
    > while true
    > do
    > * ssh whatever... look up -R or -L option for port forwarding
    > * sleep 10
    > done
    >
    > ->www.cygwin.com
    >
    > Joachim


    Hello Joachim!

    Thanks a lot for your prompt answer. Just one clarification: can I
    use Putty instead of Openssh with Cygwin? (I think Putty can also be
    used by command line).

    Thank you very much!

    Abel.

  4. Re: Autorecover ssh tunnel with Putty

    Abel wrote:
    > Hello Joachim!
    >
    > Thanks a lot for your prompt answer. Just one clarification: can I
    > use Putty instead of Openssh with Cygwin? (I think Putty can also be
    > used by command line).


    If it works on the command line, it should be doable from cygwin. Just
    make sure your paths are good.

    Although if I couldn't use openssh on the command line, I'd probably use
    'plink' rather than 'putty'.

    --
    Darren

  5. Re: Autorecover ssh tunnel with Putty

    Abel wrote:
    > Hello everybody!
    >
    > I'm using Putty 0.60 in Windows (at home) to establish a tunnel
    > through the internet with an OpenSSH server. Sometimes the connection
    > at home is broken and so is the tunnel (message Network error:
    > Software caused connection abort). So, until I return home and start
    > again the tunnel using Putty it doesn't work.
    >
    > Does anybody know if there is any way for Putty to automatically re-
    > establish the tunnel after the connection failure?
    >
    > Thanks in advance,
    >
    > Abel.


    What's breaking the tunnel? Probably a timeout by your router due to
    inactivity (just a guess as that's what happened to me). If so you could
    set the up the keepalive parameter. In OpenSSH it's called
    ServerAliveInterval. I forget what it's called in putty but I think it's
    under connection settings, and called something like "Send NULL
    packets". (I spend most of time in linux these days and don't do much in
    Windows.)

  6. Re: Autorecover ssh tunnel with Putty


    "Chuck" wrote in message
    news:2Y3Hk.1564$P5.1543@nwrddc02.gnilink.net...
    >
    > What's breaking the tunnel? Probably a timeout by your router due to
    > inactivity (just a guess as that's what happened to me). If so you could
    > set the up the keepalive parameter. In OpenSSH it's called
    > ServerAliveInterval. I forget what it's called in putty but I think it's
    > under connection settings, and called something like "Send NULL
    > packets". (I spend most of time in linux these days and don't do much in
    > Windows.)


    Thanks for information on the technology. I hope the electric
    power does not go off.


    mk5000


    "You scan the credits for your name and wonder why it's not there." --Alanis
    Morrisette


  7. Re: Autorecover ssh tunnel with Putty

    marika wrote:

    >
    > Thanks for information on the technology. I hope the electric
    > power does not go off.



    Was that the cause of the OP's issue? I missed that part of the post I
    guess.

+ Reply to Thread