Here's the problem: I'm trying to SSH into a system that is accessible from at least 3 different networks—sometimes directly, sometimes via a proxy—at different times.
Connecting directly is far faster and more reliable than connecting via an intermediate host, which is again far faster and more reliable than connecting over the general internet, so I would like SSH to attempt to connect in 3 different ways in a prioritized fashion, picking the first that succeeds.
They're all the same machine, obviously, so I don't want to keep having to manually choose between 3 different aliases depending on where I'm connecting from.
However, I can't find any mechanism for solving this. Is it possible to do this at all, or no?
If not, what do people generally do in such a situation?