Skip to content

Instantly share code, notes, and snippets.

@guitarrapc
Created May 10, 2019 19:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save guitarrapc/ee5724900da488843fec4e4b93352309 to your computer and use it in GitHub Desktop.
Save guitarrapc/ee5724900da488843fec4e4b93352309 to your computer and use it in GitHub Desktop.
.ssh config for fowarding
# proxy
Host your-domain-*
ProxyCommand ssh -W %h:%p host.name.is.here
# foward and connect
Host your-bastion-domain-*
User your_user_name
ProxyCommand ssh -W %h:%p foward-domain-name.io
IdentityFile ~/.ssh/id_rsa
ForwardAgent yes
ForwardX11 yes
ServerAliveInterval 300
ForwardX11Timeout 596h
ControlMaster auto
ControlPath ~/.ssh/mux-%r@%h:%p
ControlPersist 30m
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment