bf_multissh
所属分类:Telnet服务器
开发工具:Shell
文件大小:0KB
下载次数:0
上传日期:2015-09-14 10:33:16
上 传 者:
sh-1993
说明: 通过ssh在多个服务器上执行bash命令,
(Execute bash command on multiple servers via ssh,)
文件列表:
LICENSE (11358, 2015-09-14)
TODO.md (161, 2015-09-14)
USAGE.txt (1022, 2015-09-14)
multissh (11, 2015-09-14)
multissh.sh (4333, 2015-09-14)
# bf_multissh
Execute bash command on multiple servers at once
## Example
run "uname -a" on 3 hosts, one by one
multissh.sh host1,host2,host3 "uname -a"
run "uname -a" on 3 hosts, all at the same time
multissh.sh -b host1,host2,host3 "uname -a"
run "uname -a" on 3 hosts, using username 'admin'
multissh.sh -u admin host1,host2,host3 "uname -a"
run a number of commands on several hosts
cat commands.sh | multissh.sh admin@host1,root@host2 -
## Usage
multissh.sh [options] [host1,host2,host3] [command]
runs [command] on all specified hosts via ssh
[host] can be ip address, hostname or user@hostname
[options]:
-b : start in background (so +- simultaneously on all servers)
-i : do SSH initialisation (copy SSH pub key to remote host if necessary)
-u [user] : use this username for shh login (default: peter)
## Requirements
* bash
* sed/tr/grep (should be present in your OS if sh/bash is there)
* ssh
* gawk (optional)
近期下载者:
相关文件:
收藏者: