Created
August 12, 2016 14:50
-
-
Save scottopell/5038ed75213755fcc49fe949366c6c23 to your computer and use it in GitHub Desktop.
Bind local port to remote port with plain SSH (basically ngrok)
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
# generic version | |
ssh -R <remote_port>:<local_interface>:<local_port> <remote machine> | |
# example (dev is a host configured in ~/.ssh/config) | |
ssh -R 4567:localhost:4567 dev | |
# Ubuntu hosts require an extra step of config | |
# http://askubuntu.com/questions/50064/reverse-port-tunnelling/50075#50075 | |
# (run on server) | |
sudo echo -e "Match User scott\n GatewayPorts yes" >> /etc/ssh/sshd_config | |
service ssh restart |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment