I'm using like this.
Match host mycomputer exec "nc -Gw 1 -z 192.168.1.11 %p"
HostName 192.168.1.11
Match host mycomputer # fallback
HostName my.no-ip.dynamic
Host mycomputer
# ... other configs
Host not-my-computer
# ... other configs
ssh_config doesn't have something like indentation block. If you want to limit match sentence to a specific host, then you should describe the full condition.
You can avoid long awaiting nc
by giving it -Gw 1
(connection timeout 1s) option, and you can utilize following behaviour to avoid multiple invocation of nc
Match
Introduces a conditional block. If all of the criteria on the Match line are satisfied, the keywords on the following lines override those set in the global section of the config file, until either another Match line or the end of the file. If a keyword appears in multiple Match blocks that are satisfied, only the first instance of the keyword is applied.