#!/bin/bash #vim ip.txt server ip ip_array=$(cat /tmp/ip.txt) user="root" passwd="password" remote_cmd="/tmp/test.sh" port=6122 for ip in ${ip_array[*]} do ssh -t -p $port $user@$ip $remote_cmd done
本文出自 “汜水流年_” 博客,请务必保留此出处http://timefiles.blog.51cto.com/8475652/1884170
原文地址:http://timefiles.blog.51cto.com/8475652/1884170