Mercurial > index.cgi > dotfiles
comparison .ssh/config @ 203:f163a6073c48
Merge shared connections into one; add proxyjump for home and a couple other nice options
| author | Steve Huston <huston@astro.princeton.edu> |
|---|---|
| date | Tue, 24 Nov 2020 10:59:34 -0500 |
| parents | 8206a14c8c62 |
| children | d7f327fd082f |
comparison
equal
deleted
inserted
replaced
| 202:8206a14c8c62 | 203:f163a6073c48 |
|---|---|
| 1 # Host-specific things at the top, and get less specific as you go; first | |
| 2 # match wins | |
| 3 | |
| 1 # Turn things off for floyd - it doesn't need them | 4 # Turn things off for floyd - it doesn't need them |
| 2 Host floyd-mgmt floyd-mgmt.astro.internal | 5 Host floyd-mgmt floyd-mgmt.astro.internal |
| 3 ForwardAgent no | 6 ForwardAgent no |
| 4 ForwardX11 no | 7 ForwardX11 no |
| 5 ForwardX11Trusted no | 8 ForwardX11Trusted no |
| 6 | 9 |
| 7 # Let's try a proxy connection here | 10 # If we're not on the Princeton wired network, csesbh2 should proxy through |
| 8 Host xanadu.astro.princeton.edu | 11 # xanadu |
| 9 User huston | |
| 10 ControlMaster auto | |
| 11 ControlPersist yes | |
| 12 ControlPath ~/.ssh/sockets/%C | |
| 13 ServerAliveInterval 30 | |
| 14 # This is the default, putting here to document | |
| 15 ServerAliveCountMax 3 | |
| 16 | |
| 17 Match host csesbh2.princeton.edu exec "~/.ssh/onsubnet --not 128.112." | 12 Match host csesbh2.princeton.edu exec "~/.ssh/onsubnet --not 128.112." |
| 18 ProxyJump xanadu.astro.princeton.edu | 13 ProxyJump xanadu.astro.princeton.edu |
| 19 | 14 |
| 20 Host csesbh2.princeton.edu | 15 # If we're not on Princeton wired network, and not at home, then connections |
| 16 # to joshua should tunnel through xanadu | |
| 17 Match host joshua.srhuston.net exec "~/.ssh/onsubnet --not 128.112. && [[ `curl -s checkip.amazonaws.com` != 100.11.40.19 ]]" | |
| 18 ProxyJump xanadu.astro.princeton.edu | |
| 19 | |
| 20 # But if we *are* home, convert joshua into its internal IP address | |
| 21 Match host joshua.srhuston.net exec "test `curl -s checkip.amazonaws.com` == 100.11.40.19" | |
| 22 HostName 192.168.7.49 | |
| 23 | |
| 24 # Shared connection for xanadu, csesbh2, and joshua | |
| 25 Host xanadu.astro.princeton.edu csesbh2.princeton.edu joshua.srhuston.net | |
| 21 User huston | 26 User huston |
| 22 ControlMaster auto | 27 ControlMaster auto |
| 23 ControlPersist yes | 28 ControlPersist yes |
| 24 ControlPath ~/.ssh/sockets/%C | 29 ControlPath ~/.ssh/sockets/%C |
| 25 ServerAliveInterval 30 | 30 ServerAliveInterval 30 |
