首页 > 代码库 > 远程登录操作

远程登录操作

!/bin/bash
read -p "Input your file direction(Dont‘t use "tab".):" file
perl -ne ‘s/(\d+\.\d+\.\d+\.\d+)/print $1,"\n"/eg‘ $file > /home/deploy/lilongji/ip_list2

cat ip_list2 | while read iplist;
do
        ssh -n $iplist hostname;
done