标签:$? sshd_conf div sshd for enforce linux stop dev
#!/bin/bash #by wwp 2020-10-14 for ip in `cat ip.list` do { ping -c1 -W1 $ip &>/dev/null if [ $? -eq 0 ];then ssh $ip "sed -ri ‘/^#UseDNS/cUseDNS no‘ /etc/ssh/sshd_config" ssh $ip "sed -ri ‘/^GSSAPIAuthentication/cGSSAPIAuthentication no‘ /etc/ssh/sshd_config" ssh $ip "systemctl stop firewalld ; systemctl disable firewalld" ssh $ip "sed -ri ‘7s/enforcing/disabled/‘ /etc/selinux/config" ssh $ip "setenforce 0" fi }& done wait echo "all ok"
标签:$? sshd_conf div sshd for enforce linux stop dev
原文地址:https://www.cnblogs.com/wwp01/p/13830869.html