Last active
October 16, 2018 12:10
-
-
Save paulwinex/c5d48c4952581233c90535ca64fa8a10 to your computer and use it in GitHub Desktop.
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
# on remove server | |
echo "GatewayPorts yes" >> /etc/ssh/sshd_config | |
systemctl restart sshd | |
# on local | |
ssh -R 9000:localhost:9000 [email protected] | |
# alias | |
alias tnl='f(){ ssh -R "$1:localhost:$1" [email protected]; unset -f f; }; f' | |
# usage | |
tnl user@server 9000 | |
# autossh | |
http://www.harding.motd.ca/autossh/ | |
autossh -M 20000 -f -N your_public_server -R 9000:localhost:22 -C |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment