Abstract: Sometimes you need to go to ssh tunnel. Manually using ssh to create these is not a big problem, but if you try to boot up, write a shell script and run this script in rc.local, it is unsuccessful, and the reason is unknown. This article mainly introduces how to solve this problem.
# For each tunnel; make a uniquely named copy of this template.
## SETTINGS # # autossh monitoring port (unique) MPORT=54321 # the ssh tunnel to setup TUNNEL="-L 2003:localhost:2003" # remote user RUSER="socieer" # remote server RSERVER="socieer.axxeo.de" # You must use the real autossh binary, not a wrapper. DAEMON=/usr/lib/autossh/autossh # ## END SETTINGS