write a shell script to ssh to a remote machine and execute commands

后端 未结 9 1392
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-11-28 19:11

I have two questions:

  1. There are multiple remote linux machines, and I need to write a shell script which will execute the same set of commands in each machine.
9条回答
  •  醉酒成梦
    2020-11-28 19:41

    For this kind of tasks, I repeatedly use Ansible which allows to duplicate coherently bash scripts in several containets or VM. Ansible (more precisely Red Hat) now has an additional web interface AWX which is the open-source edition of their commercial Tower.

    Ansible: https://www.ansible.com/
    AWX:https://github.com/ansible/awx
    Ansible Tower: commercial product, you will probably fist explore the free open-source AWX, rather than the 15days free-trail of Tower

提交回复
热议问题