Skip to content

Instantly share code, notes, and snippets.

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

This comment has been minimized.

Copy link
Owner Author

@sinewalker 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
  • = 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