hanging ssh after connection, only in same shell

Oliver Albertini oliver.ruben at gmail.com
Tue Sep 27 07:30:55 PDT 2016


Hi, thanks for the response. You are right that the terminal change was coincidence.

Let me clarify my situation. I am using netctl to start the vpn session, and in the script, the sequence of commands look as follows:

sudo netctl start vpn
ssh -N -f -T -R12321:localhost:22 ssh_host
ssh ssh_host # at some point I will disconnect.
ssh -O exit ssh_host
sudo netctl stop vpn

The background ssh hangs when I run the script, but if I just run

sudo netctl start vpn

and go to another terminal (or wait long enough, apparently), I can do the rest of the commands without a hitch. With the previous version, this never happened.

Let me know if you still want to see the -v output.

Many thanks.

On Sep 27,2016 08:12, David Woodhouse wrote:
> On Tue, 2016-09-27 at 00:39 -0400, Oliver Albertini wrote:
> >
> > On arch linux, I use a script which connects me to a vpn, and
> > directly afterwards creates an ssh tunnel and then a shared ssh
> > session to a server. After I sign out of the server, the ssh tunnel
> > and also the vpn are closed.
> >
> > With the update to version 7.07 of openconnect, I noticed that the
> > ssh tunnel hangs and eventually times out. Reverting to the older
> > version (7.06) resolves the issue. The weird thing is, if I start the
> > vpn and open another terminal, the ssh tunnel works fine. Any ideas
> > why this might happen?
>
> That's very strange. Can you show output with '-v' from both versions
> as they connect? An MTU difference might explain part of the above, but
> not why it happens only from the same terminal. That one might have to
> be written off as coincidence.
>
> --
> dwmw2
>
>


--
Oliver Albertini



More information about the openconnect-devel mailing list