Created
March 14, 2016 08:07
-
-
Save kapb14/2772d1c7e64ed2454a84 to your computer and use it in GitHub Desktop.
callback подключение по SSH через туннель
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # | |
| # >> добавить в /etc/rc.local (или что-то типа того): | |
| # | |
| # turn on verbose logging | |
| export AUTOSSH_DEBUG | |
| # Sets the connection monitoring port. | |
| export AUTOSSH_PORT=61000 | |
| # specifies the connection poll time in seconds; default is 600 seconds. | |
| export AUTOSSH_POLL=300 | |
| ASSH_PORT=61000 | |
| ASSH_OPTS_1="PubkeyAuthentication=yes" | |
| ASSH_OPTS_2="PasswordAuthentication=no" | |
| ASSH_KEY="/root/.ssh/id_rsa" | |
| ASSH_CALLBACK_PORT=22202 | |
| /usr/bin/autossh -N -f -o $ASSH_OPTS_1 -o $ASSH_OPTS_2 -i $ASSH_KEY -R $ASSH_CALLBACK_PORT:localhost:22 [email protected] & | |
| # | |
| # >> подключаться с jump.host.my | |
| # | |
| ssh -l root -p 22202 localhost | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment