I have the need to connect to an SSH jump box server and then from there, SSH to another server and then issue commands. In this case, I need to issue the same exact commands to 188 servers.
Normal procedure for this:
- Connect to an SSH server that is a bookmark in Moba.
- Input
ssh0 user@privateip
- Cry
- Go about my business
- Cry as I go to the next server
I am looking to script this so I can connect to a list of servers with the 'ssh0 user@privateip' from a txt file. The txt file is currently in the following format, but can be changed:
10.0.0.1
10.0.0.2
10.0.0.3
...
10.0.0.254
So ideally, I would like to execute a command where Moba would do the following:
- Open bookmark1 in new tab
ssh0 user@private.ip.1.from.txt.file
- Open bookmark1 in new tab
ssh0 user@private.ip.2.from.txt.file
- Open bookmark1 in new tab
ssh0 user@private.ip.3.from.txt.file
- Repeat until it reaches the end of the txt file list
From there, I can use the MultiExec tool in Moba to issue the same commands simultaneously.
Would somebody please be so kind as to assist me with crafting a solution for this in Mobaxterm?