在rhel6.4上,没有sshpass的软件包,无法采用yum方式安装。从源码编译安装非常简单。
1) 下载sshpass源码:
http://sourceforge.net/projects/sshpass/
2) 编译安装
$ tar -zxf sshpass-1.05.tar.gz
$ cd sshpass-1.05
$ ./configure
$ make && make install
1) 下载expect-5.45源码
http://sourceforge.net/projects/expect/files/Expect/5.45/
2) 安装tcl-devel
$ yum install tcl-devel
3) 编译安装
$ cd expect5.45
$ ./configure
##### $ ./configure --with-tcl=/usr/lib64 --with-tclinclude=/usr/include/tcl-private/generic
$ make && make install
$ ln -s /usr/lib/expect5.45/libexpect5.45.so ./libexpect5.45.so
原文:http://blog.csdn.net/ubuntu64fan/article/details/41084407