Skip to content

Instantly share code, notes, and snippets.

@mjs
Created August 1, 2018 03:21
Show Gist options
  • Save mjs/80ec94af30fc98c19c536373ae6c6d5e to your computer and use it in GitHub Desktop.
Save mjs/80ec94af30fc98c19c536373ae6c6d5e to your computer and use it in GitHub Desktop.
SSH jump host helper
#!/bin/sh
if [ $# -ne 2 ]; then
echo "usage: sshj <jump_host> <target>"
exit 1
fi
exec ssh -o ProxyCommand="ssh -W %h:%p $1" "$2"
@mjs
Copy link
Author

mjs commented Aug 1, 2018

Example: ssh jump.host.org user@inside.host

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment