使用 pssh 在多台主机上批量执行命令
最编程
2024-07-18 15:58:40
...
使用pssh批量在多台主机上执行命令
- Centos7安装pssh
- yum安装pssh
- pip2安装pssh
- 编写host.txt
- 基本使用
- 自动接受hostkey
- 执行结果输出到文件
- 直接打印输出结果
Centos7安装pssh
yum安装pssh
pip2安装pssh
编写host.txt
相互设置主机免密
基本使用
参考: https://blog.51cto.com/dianel/1973190
自动接受hostkey
StrictHostKeyChecking=no
可以自动接受本地的hostkey
执行结果输出到文件
直接打印输出结果
上一篇: Ubuntu 服务器下无线网卡的配置详情
下一篇: python ansible 服务和脚本