I'm talking about
ssh_config(5). I wonder if you can define a config section or file based on the currently connected network.
I'm thinking about that scenario where the corporate firewall blocks port 22, but your home network doesn't. So, you have this configuration, but it's technically unnecessary at home.
Host github.com Hostname ssh.github.com Port 443
I'm sure this isn't the most interesting scenario, but I hope you can see what I'm getting at.