Skip to content

Instantly share code, notes, and snippets.

@gabsn
Last active September 18, 2017 21:07
Show Gist options
  • Save gabsn/c9d336f61b2945186857b6df7e1135bc to your computer and use it in GitHub Desktop.
Save gabsn/c9d336f61b2945186857b6df7e1135bc to your computer and use it in GitHub Desktop.
A custom ~/ssh/config file
Host *
AddressFamily inet
Compression yes
ControlMaster auto
ControlPath /tmp/ssh_mux_%h_%p_%r
ControlPersist 720m
User gabin
IdentitiesOnly yes
IdentityFile ~/.ssh/id_rsa
ForwardAgent yes
Host vagrant
HostName 127.0.0.1
User vagrant
Port 2222
UserKnownHostsFile /dev/null
StrictHostKeyChecking no
PasswordAuthentication no
IdentityFile "/dd/.vagrant/machines/default/virtualbox/private_key"
IdentitiesOnly yes
LogLevel FATAL
ForwardAgent yes
Host prd
Hostname jumpbox.datadoghq.com
Host stg
Hostname jumpbox.datad0g.com
Host stg.i-* !stg.tunnel.*
ProxyCommand ssh -q -A stg -W `echo %h | cut -d. -f2-`.node.consul:%p
StrictHostKeyChecking no
UserKnownHostsFile /dev/null
Host stg.* !stg.tunnel.* !stg.i-*
ProxyCommand ssh -q -A stg -W `echo %h | cut -d. -f2-`.datadog.service.consul:%p
StrictHostKeyChecking no
UserKnownHostsFile /dev/null
Host prd.i-* !prd.tunnel.*
ProxyCommand ssh -q -A prd -W `echo %h | cut -d. -f2-`.node.consul:%p
StrictHostKeyChecking no
UserKnownHostsFile /dev/null
Host prd.* !prd.tunnel.* !prd.i-*
ProxyCommand ssh -q -A prd -W `echo %h | cut -d. -f2-`.datadog.service.consul:%p
StrictHostKeyChecking no
UserKnownHostsFile /dev/null
Host stg.tunnel.postgres
ProxyCommand ssh -q -A stg -W dogweb-backend.datadog.service.consul:%p
StrictHostKeyChecking no
UserKnownHostsFile /dev/null
LocalForward 5433 localhost:5433
Host stg.tunnel.postgres.master
ProxyCommand ssh -q -A stg -W dogweb-backend-master.datadog.service.consul:%p
StrictHostKeyChecking no
UserKnownHostsFile /dev/null
LocalForward 5433 localhost:5433
Host prd.tunnel.postgres.master
ProxyCommand ssh -q -A prd -W dogweb-backend-master.datadog.service.consul:%p
StrictHostKeyChecking no
UserKnownHostsFile /dev/null
LocalForward 5433 localhost:5433
Host stg.tunnel.es
ProxyCommand ssh -q -A stg -W trace-es-client.datadog.service.consul:%p
StrictHostKeyChecking no
UserKnownHostsFile /dev/null
LocalForward 9200 localhost:9200
Host prd.tunnel.es
ProxyCommand ssh -q -A prd -W trace-es-client.datadog.service.consul:%p
StrictHostKeyChecking no
UserKnownHostsFile /dev/null
LocalForward 9200 localhost:9200
Host prd.tunnel.pprof.i-*
ProxyCommand ssh -q -A prd -W `echo %h | cut -d. -f4-`.node.consul:%p
StrictHostKeyChecking no
UserKnownHostsFile /dev/null
LocalForward 6100 localhost:6100
Host stg.tunnel.pprof.i-*
ProxyCommand ssh -q -A stg -W `echo %h | cut -d. -f4-`.node.consul:%p
StrictHostKeyChecking no
UserKnownHostsFile /dev/null
LocalForward 6060 localhost:6060
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment