0

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:

  1. Connect to an SSH server that is a bookmark in Moba.
  2. Input ssh0 user@privateip
  3. Cry
  4. Go about my business
  5. 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:

  1. Open bookmark1 in new tab
  2. ssh0 user@private.ip.1.from.txt.file
  3. Open bookmark1 in new tab
  4. ssh0 user@private.ip.2.from.txt.file
  5. Open bookmark1 in new tab
  6. ssh0 user@private.ip.3.from.txt.file
  7. 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?

Al H
  • 1
  • 1

1 Answers1

0

This would be very useful and interesting. Alternate way is to

  1. create a favorites/session folder with all those ips/servers (Its easy to use import sessions feature if the list is large)
  2. then right click the folder and select 'Execute all sessions from this folder'
  3. Once they get open in various tabs use the multiexec as you mentioned above to run your command(s) simultaneously.

Cheers & good luck.

JavaNovice
  • 1
  • 1
  • 2