我正在尝试在 Linux 中创建一个脚本,其中包含用于多个服务器的多个隧道并在该服务器中运行一个脚本。
基本上,我在 8 台 RedHat 机器上有一个 DailyCheck.sh,我在 Windows 中为每台机器都有一个隧道:
"putty.exe user@xxx.xxx.xxx.xxx -pw <password> -L port:127.0.0.1:port"
然后我打开每一个并运行命令 DailyCheck.sh。
我想要的是 Windows 中的一个文件:
"putty.exe user@xxx.xxx.xxx.xxx -pw <password> -L port:127.0.0.1:port"
sudo su -
./dailyCheck.sh
<delay if necessary>
"putty.exe user@xxx.xxx.xxx.xxx -pw <password> -L port:127.0.0.1:port"
sudo su -
./dailyCheck.sh
(....)
我们有办法做到这一点吗?
谢谢和最好的问候, 安德烈。
最佳答案
我建议你——而不是隧道——设置proxy command对于每个主机。然后使用 remote command execution在远程运行脚本。
关于linux - 使用多个 Linux 隧道运行 Windows 脚本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36282356/