博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
Polysh实现多服务器批量执行shell
阅读量:6993 次
发布时间:2019-06-27

本文共 1033 字,大约阅读时间需要 3 分钟。

安装

wget wget http://guichaz.free.fr/polysh/files/polysh-0.4.tar.gztar -zxvf polysh-0.4.tar.gzcd polysh-0.4python setup.py install

目录/usr/bin/polysh

示例

polysh –user=root –hosts-file=ip.txt –password=p.txt#配置好主机地址ip.txt 不想输密码也可以提前配置公共key免密码登陆#登陆成功后即可批量执行命令

语法结构

Usage: /usr/bin/polysh [OPTIONS] HOSTS…
Control commands are prefixed by “:”. Use :help for the list
Options:

  • –version show program’s version number and exit
  • -h, –help show this help message and exit
  • –hosts-file=FILE read hostnames from given file, one per line
  • –command=CMD command to execute on the remote shells
  • –ssh=SSH ssh command to use [exec ssh -oLogLevel=Quiet -t
  • %(host)s exec bash –noprofile]
  • –user=USER remote user to log in as
  • –no-color disable colored hostnames [enabled]
  • –password-file=FILE read a password from the specified file. – is the tty.
  • –log-file=LOG_FILE file to log each machine conversation [none]
  • –abort-errors abort if some shell fails to initialize [ignore]
  • –debug print debugging information

转载于:https://www.cnblogs.com/linuxde/p/8719523.html

你可能感兴趣的文章
C++ const总结
查看>>
mycncart1.1.0.0 发布
查看>>
修改django-模型方法
查看>>
小团队项目搭建代码管理工具 gitlab8.9以及项目管理工具redmine 3.3 安装配置指南...
查看>>
Windows 8/Windows 8.1镜像安装Microsoft .NET Framework 3.5的方法
查看>>
ajaxFileUpload+ThinkPHP+jqGrid 图片上传与显示
查看>>
Python 元类
查看>>
IO流文件拷贝性能对比
查看>>
mac下更新自带的PHP版本到5.6或7.0
查看>>
Oracle——10用户自定义函数
查看>>
硬盘空间满导致mysql ibd文件被删后提示Tablespace is missing for table 'db_rsk/XXX"
查看>>
Scala之初步认识与环境准备
查看>>
JFinal跨域方法的两种实现
查看>>
数据库根据字段模糊查询的思路
查看>>
基于IOS上MDM技术相关资料整理及汇总
查看>>
HBase新建表报错 org.apache.hadoop.hbase.TableExistsException
查看>>
微信小程序教程、微信小程序开发资源下载汇总(6.16日更新,持续更新中……)...
查看>>
解决eclipse莫名其妙退出问题
查看>>
MySQL mysqli_connect() 不能连接数据库问题
查看>>
基于ceph rbd+corosync+pacemaker HA-NFS文件共享
查看>>