wget http://www.netfort.gr.jp/~dancer/software/downloads/libdshconfig-0.20.9.tar.gz
tar zxvf libdshconfig-0.20.9.tar.gz
cd libdshconfig-0.20.9
./configure
make && make install
wget http://www.netfort.gr.jp/~dancer/software/downloads/dsh-0.25.9.tar.gz
tar zxvf dsh-0.25.9.tar.gz
cd dsh-0.25.9
./configure
make && make install
ln -s /usr/local/lib/.1 /lib64/
[root@china-channel ~]# dsh –help
Distributed Shell / Dancer’s shell version 0.25.9
Copyright 2001-2005 Junichi Uekawa,
distributed under the terms and conditions of GPL version 2
-v –verbose Verbose output 详细模式输出
-q –quiet Quiet 安静模式输出
-M –show-machine-names Prepend the host name on output显示被控制主机的hostname
-H –hide-machine-names Do not prepend host name on output 不显示主机名(default)
-i –duplicate-input Duplicate input given to dsh
-b –bufsize Change buffer size used in input duplication
-m –machine [machinename] Execute on machine 主机名
-n –num-topology How to divide the machines
-a –all Execute on all machines 主机列表,默认列表在/root/.dsh/machines.list
-g –group [groupname] Execute on group member 指定主机名组,主机名组在/root/.dsh/group/
-f –file [file] Use the file as list of machines 选择主机列表
-r –remoteshell [shellname] Execute using shell (rsh/ssh) 指定远程工具,默认为rsh
-o –remoteshellopt [option] Option to give to shell
-h –help Give out this message
-w –wait-shell Sequentially execute shell 指定顺序运行,默认是并行
-c –concurrent-shell Execute shell concurrently
-F –forklimit [fork limit] Concurrent with limit on number
-V –version Give out version information
把id_rsa.pub拷贝到被控制机的/root/.ssh/目录下:
[root@mail176 .ssh]#mv id_rsa.pub authorized_keys
[root@mail176 .ssh]#chmod 600 authorized_keys
对于有多个不同控制机的,可以通过cat id_rsa.pub >>authorized_keys 追加的形式
















