Ssh
通過 2 個 ssh 隧道安裝軟體包
我有以下情況:
Server_A : Host that needs to get packages installed Server_B : Host that it's used to connect to Server_A Server_C : Host that it's used to connect to Server_B Server_D : Host that it's a local mirror
Server_C 可以使用 Server_D 作為具有正確 mirror.repo 文件的鏡像。Server_B 可以這樣安裝帶有 ssh 隧道的軟體包:
[Server_C]% ssh -R 9999:Server_D:80 Server_B
如何創建使用第一個隧道安裝軟體包的新隧道?
最後,我能夠通過從第二台伺服器創建一個新隧道來做到這一點。作為參考,命令是:
[Server_C]% ssh -R 9999:Server_D:80 Server_B [Server_B]% ssh -R 80:localhost:9999 Server_A