0.0.4-alt1
[autosshd_ALT.git] / autosshd / etc / autossh.d / example.com.conf.template
blob8d4da82e6137cca23a7838e13173df7134a49cf1
1 # Config for autossh
2 # Manual: http://wiki.etersoft.ru/Autosshd
4 #The main connection parameters:
5 #1. Set remote host address or corresponding ip:
6 SSHHOST=user@example.com
7 #REMOTE_KEY=~/.ssh/id_rsa.pub
9 #4. Correct remote ports if necessary:
10 LOCAL_PORT=22            # the port is listen by sshd
11 REMOTE_PORT=10210        # the port for ssh command on $HOST $ ssh -p $REMOTE_PORT $REMOTESSH_USER@127.0.0.1
12 AUTOSSH_PORT=11210       # the local port for monitoring purposes (port+1 will used too, see man autossh)
14 AUTOSTART=yes
16 REMOTE_KEY_OPT=
17 [ -n "$REMOTE_KEY" ] && REMOTE_KEY_OPT="-i ${REMOTE_KEY}"
19 SSH_OPTIONS="-N $REMOTE_KEY_OPT -R ${REMOTE_PORT}:localhost:${LOCAL_PORT} ${SSHHOST} -o StrictHostKeychecking=no ${SSH_OPTIONS}"
20 AUTOSSH_OPTIONS="-M ${AUTOSSH_PORT} -f ${SSH_OPTIONS}"