Skip to content

Instantly share code, notes, and snippets.

@zhanglintc
Last active January 19, 2021 14:17
Show Gist options
  • Save zhanglintc/158ac2a6149a2c1ee030ff5165a2fd30 to your computer and use it in GitHub Desktop.
Save zhanglintc/158ac2a6149a2c1ee030ff5165a2fd30 to your computer and use it in GitHub Desktop.
ssh nc proxy
# 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