1、使用CentOS yum源(安装的是最新版的,我安装的是2.7.5)
yum install python*
2、下载pass的压缩包
网站是http://www.theether.org/pssh/
下载地址是http://www.theether.org/pssh/pssh-1.4.3.tar.gz
[root@szlnmp01 tmp]# tar -zxvf pssh-1.4.3.tar.gz
[root@szlnmp01 pssh-1.4.3]# python setup.py install
成功后执行pssh和pscp会提示
[root@szlnmp01 pssh-1.4.3]# pssh
Usage: pssh [OPTIONS] -h hosts.txt prog [arg0] ..
-h --hosts hosts file (each line "host[:port] [user]")
-l --user username (OPTIONAL)
-p --par max number of parallel threads (OPTIONAL)
-o --outdir output directory for stdout files (OPTIONAL)
-e --errdir output directory for stderr files (OPTIONAL)
-t --timeout timeout (secs) (-1 = no timeout) per host (OPTIONAL)
-O --options SSH options (OPTIONAL)
-v --verbose turn on warning and diagnostic messages (OPTIONAL)
-P --print print output as we get it (OPTIONAL)
-i --inline inline aggregated output for each server (OPTIONAL)
Example: pssh -h nodes.txt -l irb2 -o /tmp/foo uptime
[root@szlnmp01 ~]# pscp
Usage: pscp [OPTIONS] -h hosts.txt local remote
-r --recursive recusively copy directories (OPTIONAL)
-h --hosts hosts file (each line "host[:port] [login]")
-l --user username (OPTIONAL)
-p --par max number of parallel threads (OPTIONAL)
-o --outdir output directory for stdout files (OPTIONAL)
-e --errdir output directory for stderr files (OPTIONAL)
-t --timeout timeout (secs) (-1 = no timeout) per host (OPTIONAL)
-v --verbose turn on warning and diagnostic messages (OPTIONAL)
-O --options SSH options (OPTIONAL)
Example: pscp -h hosts.txt -l irb2 foo.txt /home/irb2/foo.txt
http://cukdd.blog.chinaunix.net/uid-29712753-id-4482435.html