Skip to content

Instantly share code, notes, and snippets.

@drewdeponte
Created December 17, 2009 18:46
Show Gist options
  • Save drewdeponte/258930 to your computer and use it in GitHub Desktop.
Save drewdeponte/258930 to your computer and use it in GitHub Desktop.
I found the below bits after doing some research on ProxyCommand at http://blog.chmouel.com/2009/02/08/proxycommand-ssh-bastion-proxy/
It becomes very useful when you are using a bastion server as well as useful in many other ways.
Host mygw
HostName bastion.server.host.name
ProxyCommand none
# ControlMaster auto
# ControlPath ~/.ssh/master-%r@%h:%p
Host es-*
ProxyCommand ssh mygw 'nc -w 600 %h %p'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment