无管理员权限安装sshpass
#!/bin/bash
# compile the source code of sshpass,download URL: http://sourceforge.net/projects/sshpass/files/sshpass/1.05/sshpass-1.05.tar.gz
# download the source code then unzip it.
sshpasspath=
cd $sshpasspath
tar -xvf sshpass-1.05.tar.gz
mkdir bin
cd $sshpasspath/sshpass-1.05
./configure --prefix=$sshpasspath/bin
make && make install
echo "export PATH=$sshpasspath/sshpass:\$PATH" >> $HOME/.bashrc && source $HOME/.bashrc
echo "===============sshpass install finished!==============="
#the method to use the sshpass
# sshpass -p yourpassword ssh username@yourIP
参考链接:https://blog.csdn.net/u010305706/article/details/52985993