linux远程命令执行工具-sshpass

版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接: https://blog.csdn.net/weixin_39304564/article/details/102625167

一、安装sshpass

wget https://nchc.dl.sourceforge.net/project/sshpass/sshpass/1.06/sshpass-1.06.tar.gz
tar zxvf sshpass-1.06.tar.gz
cd sshpass-1.06
./configure --prefix=/opt/sshpass
make && make install
cp /opt/sshpass/bin/sshpass /usr/bin/

二、使用sshpass

sshpass -p '123456' scp root@host_ip:/home/test/t ./tmp/

猜你喜欢

转载自blog.csdn.net/weixin_39304564/article/details/102625167