Last active
June 27, 2017 07:33
-
-
Save ltpitt/754df331bdd4fd2e36a218ffd8113f84 to your computer and use it in GitHub Desktop.
Reverse tunnel ssh on Linux
This file contains 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
#!/bin/sh | |
# Forward only to loopback interface of the server | |
ssh -fN -R 10022:CLIENTIPTOFORWARD:22 SERVER | |
# Forward to all interfaces | |
# In this case it is mandatory to add | |
# GatewayPorts yes | |
# to /etc/ssh/sshd_config | |
ssh -R \*:3389:WINDOWSCLIENT:3389 -N [email protected] | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment