Package: autossh
Version: 1.4a-3

/usr/share/doc/autossh/README.Debian says:

[...]
  Note: if your ssh client/server version is recent enough you can
  obtain similar behaviour by setting ClientAliveCountMax and
  ServerAliveInterval in /etc/ssh/sshd_config. See sshd_config(5).

This echoes a recommendation made by autossh's author, and it is supposedly a superior method of accomplishing connection monitoring.

Given this, and that you know the range of SSH versions that will be installed along side this Debian package (which should all be new enough to support this...unless you're trying to support non-openssh clients like dropbear), I recommend eliminating the random port selection logic in the wrapper script, and instead have the wrapper script (pre)append SSH options to implement the above.

Something like:

if [...existing code to skip this if -M or AUTOSSH_PORT is set...]
    export AUTOSSH_PORT=0
    monitor=("-o" "ServerAliveInterval ${AUTOSSH_POLL:=300}")
fi

exec /usr/lib/autossh/autossh "${monit...@]}" "$@"


Technically, it needs to be a little more sophisticated, as it should insert "${monit...@]}" after the occurrence of a "--" parameter, if it exists.

 -Tom



--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to