Hi Stuart, thanks for the bug report.
I'll have a closer look at it later. Stuart Langridge wrote: > I have three machines, called REMOTE, INTERNET, and LOCAL. REMOTE and > LOCAL are both behind firewalls (in completely separate places). > INTERNET is on the internet. I need to be able to SSH into REMOTE _from_ > LOCAL. To do this I have done the following: > > 1. used autossh on LOCAL to set up a ssh tunnel from LOCAL to INTERNET, which > forwards INTERNET port 22222 back down the ssh tunnel to LOCAL port 22 > 2. used autossh on REMOTE to set up an ssh tunnel from REMOTE to INTERNET > port 22222 (i.e., to LOCAL port 22) which forwards LOCAL port 10022 back down > the ssh tunnel to REMOTE port 22 > > This means that I can now, on LOCAL, do "ssh -p 10022 localhost" and be > connected to REMOTE. While this seems a rather complicated setup where I can't say on a first glance what went wrong, I have a few ideas how it might work better (or at least easier to find the culprit): 1. Don't use autossh 3 times but 1 time plus SSH's jumphost feature. Via .ssh/config: Host REMOTE ProxyCommand ssh INTERNET -W REMOTE:22 That way you just have to call "autossh REMOTE" and everything else is done automatically. This should work also with Xenial. Via commandline there's a shortcut since OpenSSH 7.3 (only in Yakkety and newer): autossh -- -J INTERNET REMOTE (The "--" is unfortunately necessary as autossh thinks of -J as invalid SSH option, probably because it is a rather new option.) 2. Autossh per Default only checks every 10 minutes if the connection is still alive. That interval is rather long. So you might want to reduce the check interval for each of your autossh connection to make autossh react more timely if the connection stalls: Replace every occurrence of "autossh" in your setup with e.g. "env AUTOSSH_POLL=5 autossh" to see if that already helps. Hope this helps! Regards, Axel -- ,''`. | Axel Beckert <a...@debian.org>, http://people.debian.org/~abe/ : :' : | Debian Developer, ftp.ch.debian.org Admin `. `' | 4096R: 2517 B724 C5F6 CA99 5329 6E61 2FF9 CD59 6126 16B5 `- | 1024D: F067 EA27 26B9 C3FC 1486 202E C09E 1D89 9593 0EDE -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1700498 Title: Autossh does not notice when connection "freezes", starts new connection without removing the old process To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/autossh/+bug/1700498/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs