$HOME/.ssh/config
场景:Host A 可以连接Host Jump,连接Host wan.foreign延迟过高或失败,Host Jump和A、wan.foreign连接都稳定
1 2 3 4
| A ----> Jump ----> wan.foreign | ^ | | |----- Can't Connect --- |
|
示例配置如下
1 2 3 4 5 6 7 8 9
| Host jump HostName 192.168.0.1 Port 22 User root
Host wan.foreign-* HostName %h ProxyCommand ssh jump -W %h:%p Compression yes
|