参考:http://www.2cto.com/os/201307/227911.html
手动下载地址:http://sourceforge.net/projects/sshpass/
安装示例:
wget -c http://downloads.sourceforge.net/project/sshpass/sshpass/1.05/sshpass-1.05.tar.gz
tar -xzvf sshpass-1.05.tar.gz
cd sshpass-1.05
./configure
make && make install
使用示例:
sshpass -p "thepassword" ssh -p2222 man@123.123.123.123
CentOS6下可以从/var/log/secure文件中查看到ssh登录记录