Created
August 31, 2017 07:15
-
-
Save mulderu/f220b097a4f03b2577f0bad7f2450606 to your computer and use it in GitHub Desktop.
reverse ssh, ssh forwarding
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
# reverse ssh tunneling | |
# simple way | |
# ref from : https://www.howtoforge.com/reverse-ssh-tunneling | |
# | |
# env-summary | |
# target : 192.168.5.10 (internal ip in firewall) | |
# ssh-gateway : 100.100.100.10 (static ip in public access) | |
# | |
# step 1) login to ssh-gateway from target(target is your final destination) | |
ssh -R 19999:localhost:22 mulder@100.100.100.10 | |
# okay... established connection and keep connection, don't logout | |
# | |
# step 2) you can login to ssh-gateway from anyware (keep connection step1) | |
# | |
ssh mulder@100.100.100.10 | |
# | |
# step 3) go to target host (to internal host) from gateway-host | |
ssh -p 19999 localhost | |
# |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment