Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
SSH jump to one host via another
Host *-via-jumpbox
ProxyCommand ssh user@jumpbox.net nc $(echo %h | sed 's/-via-jumpbox$//') %p
@sinewalker

This comment has been minimized.

Copy link
Owner Author

sinewalker commented Apr 3, 2019

Put this snippet into your ~/.ssh/config and you can SSH to any host (that is reachable) via your user on a (fictitious) jumpbox

  • user = your username at jumpbox.net
  • jumpbox.net = some unix machine you can SSH to, that has nc (netcat) and sed installed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.