SSHconfig — Configure SSH for Your Current Network
SSHconfig takes configuration files written in Python that describe your known hosts, networks, proxies, locations, etc and produces an SSH file that is optimized for the network you are on. When used with a laptop, you would simply regenerate your SSH config file whenever you move your computer. In this way, you always use the fastest paths available for your ssh related activities (sshfs, email, vnc, git, mercurial, etc.). You can also easily reconfigure ssh to make use of proxies as needed or select certain servers or ports based on your location or the restrictions of the network.
SSHconfig is also useful for workstations and servers that always remain on the same network because the SSH config files on those machines often have to be customized to the network they are on, and with SSHconfig you can generate those config files from a common shared source file.
You can find the latest version of the source code on Github.