In .ssh/config, I have set a RemoteForward for all hosts in a given domain:
Host *.[domain]
RemoteForward [remote-port] 127.0.0.1:[local-port]
How do I unset that parameter for a specific host within that domain (e.g., git.[domain])?
Try the ClearAllForwardings setting:
Host *.[domain]
RemoteForward [remote-port] 127.0.0.1:[local-port]
Host git.[domain]
ClearAllForwardings yes
Does git not automatically set ClearAllForwardings=yes, as scp and sftp do?
RemoteForward 52698 127.0.0.1:52698 on top of ~/.ssh/config to use rsub on all domains, but then started getting Warning: remote port forwarding failed for listen port 52698 when connecting to GitHub (since it obviously doesn't allow forwarding a port). With ClearAllForwardings=yes under Host github.com the error went away.
ssh_configmanpage mentions the use of negation to exclude certain hosts, but only for keys in the.ssh/authorized_keys. Have tried similar combinations in.ssh/configbut no diceHost !git.[domain],*.[domain]to do what you want. What are the combinations you tried?