sshpass安装使用
部署sshpass
1.下载
wget http://sourceforge.net/projects/sshpass/files/latest/download -O sshpass.tar.gz
2.编译安装
tar -zxvf sshpass.tar.gz
cd sshpass-1.06
./configure
make
make install
3.使用
/opt/sshpass-1.06/sshpass -p oracle scp /home/oracle/soft/sshpass.tar.gz oracle@192.168.1.1:/home/oracle/script/
/opt/sshpass-1.06/sshpass -p oracle ssh oracle@192.168.1.1 -o StrictHostKeyChecking=no "/home/oracle/script/get_df.sh" 2>/dev/null