检测ip是否ping通和ssh端口是否通 #! /bin/bash port=22 for i in `cat $1` do ping -c 2 $i >/dev/null 2>&1 if [ $? -eq 0 ];then echo -e "