在 .ssh/config
中,我为给定域中的所有主机设置了一个 RemoteForward
:
Host *.[domain]
RemoteForward [remote-port] 127.0.0.1:[local-port]
如何为该域中的特定主机取消设置该参数(例如,git.[domain]
)?
最佳答案
尝试 ClearAllForwardings 设置:
Host *.[domain]
RemoteForward [remote-port] 127.0.0.1:[local-port]
Host git.[domain]
ClearAllForwardings yes
git 不会像 scp 和 sftp 那样自动设置 ClearAllForwardings=yes 吗?
关于ssh - 在 SSH 配置中为特定主机取消设置参数,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9035387/