sshDigger − the MagAO-X SSH tunnel manager
$ sshDigger [options] -n tunnel_name
tunnel_name denotes the section in the configuration file(s) which contains the specification of the tunnel.
sshDigger is normally configured via a base configuration file, hence all other command-line arguments are optional.
sshDigger uses the
autossh utility to form a robust
SSH tunnel or port forward to a remote host. In addition, the forked
autossh process is monitored, and if it dies a new one is created.
The base configuration is normally located at
/opt/MagAOX/config/sshTunnels.conf. It should contain options applicable to all tunnels, as well as the tunnel definitions themselves.
The tunnel name must be specified with the
-n command line option.
This app does not require that an instance specific configuration
tunnel_name.conf be available. If one is available matching the name given with the
-n tunnel_name option, then any settings contained therein will override those given in the base config file.
Tunnels are specified by a section in the configuration files, normally the base
sshTunnels.conf file. The section must have the following members
[tunnel_name] remoteHost=resolvable_name localPort=X remotePort=Y
resolvable_nameis an ip address or host name. This can include a user name
user@at the beginning if needed.
Xdenotes the integer local port number.
Ydenotes the integer remote port number
This results in
ssh being started with
$ ssh -nNTL X:localhost:Y resolvable_name
||config||string||A local config file|
||none||Print this message and exit|
||loopPause||unsigned long||The main loop pause time in ns|
||RTPriority||unsigned||The real-time priority (0-99)|
||logger.logDir||string||The directory for log files|
||logger.logExt||string||The extension for log files|
||logger.maxLogSize||string||The maximum size of log files|
||logger.writePause||unsigned long||The log thread pause time in ns|
||logger.logThreadPrio||int||The log thread priority|
||logger.logLevel||string||The log level|
||name||string||The name of the application, specifies config.|
TODO: add more of the config options, make -n required.
* format in the config file column is section.option which implies the format:
in the config file.
This app does not use INDI.
sshDigger runs until killed, and will restart
autossh, which in turn restarts
ssh, as long as it is running. Use the
logdump utility to examine the process log for errors.
To create an SSH tunnel for
$ /opt/MagAOX/bin/sshDigger -n magaox_aoc_to_rtc_indi
Which expects a configuration entry of the form:
[magaox_aoc_to_rtc_indi] remoteHost=rtc localPort=7630 remotePort=7624
This then securely forwards traffic from
localhost:7630 to the INDI server on