add
This commit is contained in:
13
21-资阳移动/批量执行.sh
Normal file
13
21-资阳移动/批量执行.sh
Normal file
@@ -0,0 +1,13 @@
|
||||
|
||||
|
||||
host_list=(192.168.6.3 192.168.6.7 192.168.6.5)
|
||||
for host in ${host_list[@]}
|
||||
do
|
||||
echo "current host is $host"
|
||||
ssh -p 2022 root@"$host" "cp /etc/ssh/sshd_config /etc/ssh/sshd_config_zyly"
|
||||
scp -P 2022 /etc/ssh/sshd_config root@"$host":/etc/ssh/sshd_config
|
||||
ssh -p 2022 root@"$host" "systemctl restart sshd"
|
||||
echo ""
|
||||
|
||||
done
|
||||
|
||||
Reference in New Issue
Block a user