Last active
January 19, 2021 14:17
-
-
Save zhanglintc/158ac2a6149a2c1ee030ff5165a2fd30 to your computer and use it in GitHub Desktop.
ssh nc proxy
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
# bastion is the jump server | |
# target is the target server | |
# %h stands for host given to ssh, here is target | |
# %p stands for port given to ssh, here is 22(the default port) | |
ssh -go ProxyCommand='ssh user@bastion nc %h %p' user@target |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment