I have a scenario:My system has 2 servers: server_A and server_BOn server_A I create a shell script to execute commands on server_A and server_B by this flow:Run command1 on server_A and wait for completion.Run command2 on server_B and wait for completion.Run command3 on server_A and wait for completion.(etc.)Is there any good solutions for this case?Thank you a lot.
Shell script to run Linux command on multiple servers command by command
linux;shell
You can just make a script on server_A with : command1ssh server_B command2command 3