Quantcast
Channel: Automatically Run Multiple Command over SSH on multiple devices - Unix & Linux Stack Exchange
Viewing all articles
Browse latest Browse all 2

Answer by Senthil for Automatically Run Multiple Command over SSH on multiple devices

$
0
0

I would use ansible. Ansible is used specifically to run commands using SSH over multiple devices. You can run one command at a time using ansible shell or multiple commands sequenced together using ansible playbook.

If you don't want to install, setup and run ansbile I would do this as a two part step. Once script to scp the script over to all the hosts (perhaps the /tmp directory). Then a second to run the script. Make sure the script is backgrounded (nohup) and logs output in the local device. Perhaps a 3rd script to check the logs/success.


Viewing all articles
Browse latest Browse all 2

Latest Images

Trending Articles





Latest Images