In the office, I can connect to internal machines without a proxy, but need a proxy for external connections. Outside of the office, I can connect to other external machines without a proxy, but need to use one of 2 proxies to connect to internal machines.
If I can figure out a way to autodetect what network I'm on, can I instruct ssh to load the appropriate config file?
If not, is there a more elegant solution than writing a shell script to symlink the appropriate config file to ~/.ssh/config (my best idea so far)?
Edit: I think @pcm and JonnyRo understood my question and I'll try what they suggest, but just to be clear, I want
|--------\ Dest | abc.example.com | xyz.external.org |
| Source \---------\| | |
|--------------------+-----------------+------------------|
| example.com office | No Proxy | Proxy |
| outside | Proxy | No Proxy |