linux遠程命令執行工具-sshpass

一、安裝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/
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章