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…
author:headsen chen date : 2017-11-29 15:46:39 notice:created by headsen chen himself and not allowed to copy,or will done by low. 应用范围:可以在命令行直接使用密码来进行远程连接和远程拉取文件. 实例1:直接远程连接某台主机: 命令:sshpass -p xxx ssh root@192.168.11.11 实例2:远程连接指定ssh的端口: 命令:s…