Your message dated Tue, 18 Apr 2017 20:45:46 +0200 with message-id <20170418184546.gy6...@sym.noone.org> has caused the report #860561, regarding autossh: Restarts SSH session every $AUTOSSH_POLL seconds if (auto)ssh is called with option "-6" (i.e. when enforcing IPv6 usage) to be marked as having been forwarded to the upstream software author(s) Carson Harding <hard...@motd.ca>
(NB: If you are a system administrator and have no idea what this message is talking about, this may indicate a serious mail system misconfiguration somewhere. Please contact ow...@bugs.debian.org immediately.) -- 860561: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=860561 Debian Bug Tracking System Contact ow...@bugs.debian.org with problems
--- Begin Message ---Dear Carson, today I stumbled upon the following issue with at least autossh 1.4e, but likely all versions since 1.2c: If ssh (OpenSSHversion 7.4p1 in my case) is called with option "-6", all local port forwardings listen on IPv6 localhost (i.e. ::1) only, too. But autossh attempts to "pass traffic on the monitor forwarded port" only on IPv4 localhost (127.0.0.1) which causes the error message connect_to 127.0.0.1: unknown host (Address family for hostname not supported) and then kills and respawns the SSH connection. An easy way to reproduce this on a IPv6-capable host is this simple command: env AUTOSSH_POLL=2 autossh -6 localhost This issue is probably caused by or at least related to this change in 1.2c: use Marcus Friedl's suggestion to simply connect to "127.0.0.1" rather than "localhost", as not really using IPv6 anyway. And this gets rid of annoying ipv6 localhost message on Solaris at least. But then again, just changing "127.0.0.1" to "localhost" doesn't seem to fix the issue. Now I get this error message: connect_to localhost port 60059: failed. And in the syslog this one: timeout polling to accept read connection I've tried this with hosts which have both, A and AAAA record, host which only have an AAAA record and pure IPv6 addresses. So I'm not sure what's the proper way to solve this. Maybe an option or environment variable to configure "mhost" dynamically or by the user if needed? Looking at the presence of the option "-6" or "-o AddressFamily=inet6" is probably only a workaround to mitigate the issue as the AddressFamily option could also be configured in .ssh/config, even only per host. And I don't think autossh should start parsing .ssh/config. Maybe there's a chance to gather on which IP address the child ssh process is listening to in the /proc file system. But then again, that's probably linux-specific and might not work on other Unices. :-/ P.S.: I've documented this in the Debian bug tracking system at https://bugs.debian.org/860561 -- if you Cc 860...@bugs.debian.org, your replies will show up and be archived under that URL, too. 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
signature.asc
Description: Digital signature
--- End Message ---