Skip to content

Instantly share code, notes, and snippets.

@brandocorp
Created January 16, 2015 17:19
Show Gist options
  • Save brandocorp/8bac7ba65ac199d3b104 to your computer and use it in GitHub Desktop.
Save brandocorp/8bac7ba65ac199d3b104 to your computer and use it in GitHub Desktop.
use jumphost with ssh proxy command
Host *
ControlMaster auto
ControlPath ~/.ssh/tmp/%h_%p_%r
TCPKeepAlive yes
ServerAliveInterval 30
ConnectTimeout 15
LogLevel ERROR
Host jumphost
HostName ${JUMPHOST_IP}
User ${JUMPHOST_USER}
IdentityFile ${JUMPHOST_PRIV_KEY}
ProxyCommand none
Host ${SERVER_IP_GLOB}
User ${SERVER_USER}
IdentityFile ${SERVER_PRIV_KEY}
ProxyCommand ssh -e none jumphost exec nc -w 60 %h %p 2>/dev/null
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment