|
autossh |
autossh - Automatically restart SSH sessions and tunnels
Update: Version 1.4g most notably addresses a bug that could see an alarm signal occur without a handler, causing autossh to exit inappropriately.
Previous update: Version 1.4f incorporates a number of changes and fixes to signal handling and exit conditions. The most notable changes are that it will exit properly when killed while waiting between ssh restarts, and it will now restart rather than exiting when the child ssh process is killed.
Previous update: Version 1.4e always sets the first poll time equal to the poll time, unless the first poll time is explicitly set with AUTOSSH_FIRST_POLL.
Previous update: version 1.4d fixes file descriptor issues when started without standard input available (for example, in system initialization scripts).
Previous update: version 1.4c disables the "gatetime" behaviour when -f is used, updates the list of OpenSSH options it knows about, and adds some fixes to configure.
Previous update: version 1.4b fixed a bug in polling, added a max lifetime option and a compile-time option to touch the pid file on each connection test.
FEATURES
- autossh is a program to start a copy of ssh and monitor it, restarting it as necessary should it die or stop passing traffic. The idea is from rstunnel (Reliable SSH Tunnel), but implemented in C.
- The author's view is that it is not as fiddly as rstunnel to get to work.
- Connection monitoring using a loop of port forwardings or a remote echo service.
- Backs off on rate of connection attempts when experiencing rapid failures such as connection refused.
- Compiled and tested on OpenBSD, Linux, Solaris, Mac OS X, Cygwin, and AIX; should work on other BSDs.
- Freeware.
FUN
- Use with "screen" for perpetual session (see included script "rscreen").
DEFICIENCIES
BUILD
If you use OpenBSD or FreeBSD, autossh is available in the ports tree, and as a package. Cygwin and some Linux distros also have it available as a package.
To build from source:
- download autossh-1.4g.tgz (md5/sha1/sha256)
- gunzip -c autossh-1.4g.tgz | tar xvf -
- cd autossh-1.4g
- ./configure
- make
- copy binary to where you wish it, or "make install" will install it under /usr/local by default.
- examine autossh.host for example wrapper script and options
USE
- Read README for documentation.
- Or once installed, read the man page.
$Date: 2019/01/09 21:43:35 $