At the moment, I have two remotes on my git repos, one pointing to git when I am at home, and one pointing to git-ext when I am away. It want to simplify this. The below ssh config works with both git and git-ext (note the match statement is commented out). If I uncomment the match block, from what I can tell, there is no change in the behavior of the git block. When I am home, it works, when I am away, it does not.
It goes not matter if I use exec or !exec. Nothing seemingly changes. I am not sure what if happening, but I would have to say that the exec is not actually running. Any help would be appreciated.
This is running from windows WSL2, Debian 11, OpenSSH_8.4p1, Though I did try on my linux laptop running Debian 12 also, with the same results.
host git
hostname 192.168.1.10
user git
identityfile ~/.ssh/id_rsa_git
#match host git !exec "/usr/bin/ping -c1 192.168.1.1"
# proxyjump bastion
host example.com
hostname example.com
user user
identityfile ~/.ssh/id_rsa_cloud
host bastion
hostname 192.168.1.5
user jump
identityfile ~/.ssh/id_rsa_bastion
proxyjump example.com
host git-ext
hostname 192.168.1.10
user git
identityfile ~/.ssh/id_rsa_git
proxyjump bastion