1

I'm trying to create a Script in Linux with several tunnels for several servers and run a script in that servers.

Basically i've a DailyCheck.sh in 8 machines RedHat and i've a tunnel for each one in windows with:

"putty.exe user@xxx.xxx.xxx.xxx -pw  <password> -L port:127.0.0.1:port"

And i open each one and run the command DailyCheck.sh.

What i want is one file in Windows with:

"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
(....)

we have any way to do this?

Thanks & Best Regards, André.

Mark Setchell
  • 191,897
  • 31
  • 273
  • 432

1 Answers1

1

I recommend you would - instead of tunnels - set up proxy command for each host. Then use remote command execution to run the script on remote.

Also, to get better answers, I recommend tags and .

Community
  • 1
  • 1
jil
  • 2,601
  • 12
  • 14