sshpass批量执行操作

while read line
do ./sshpass -p 密码 ssh root@$line “ls” done<./backup

while read line ;do /usr/bin/sshpass -p 密码 ssh root@128.199.114.243 “ls”;
done <./ip.list
for i in `cat ip.list` ;do /usr/bin/sshpass -p 密码 ssh root@128.199.114.243 “ls”;
done

 

/usr/bin/sshpass -p 密码 scp file 128.199.114.243:/root 复制文件

/usr/bin/sshpass -p 密码 ssh root@128.199.114.243 “ls” 执行命令

posted @ 2015-11-30 17:21  dantes博客  阅读(1243)  评论(0编辑  收藏  举报