ssh方向代理配置命令
步骤说明:
myssh <–> switch-server <–> remote-server
192.168.11.100 192.168.10.100 192.168.9.100
在remote-server上执行 反向代理
ssh -fCNR 192.168.10.100:10022:localhost:22 root@192.168.10.100
#意思就是将A机器的22号端口的转发至192.168.10.100的10022端口
在switch-server上执行 正向代理
ssh -fCNL *:10122:localhost:10022 localhost
#意思就是将本地监听的10122端口的流量都转发给本地的10022端口
在本地ssh登录remote-server
ssh root@192.168.10.100:10122