Last active
February 16, 2018 18:59
-
-
Save omartrigui/05bfc84f9abaf34e7d59c5a4ca31fa2f to your computer and use it in GitHub Desktop.
Bind local port to remote port with 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
# Server | |
sudo echo -e "Match User username\n GatewayPorts yes" >> /etc/ssh/sshd_config | |
service ssh restart | |
# Client | |
ssh -i ~/path/private/key -R 9876:localhost:8000 -N [email protected] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment