Centos 7 SSH 連接慢

修改 UseDNS

[root@test1 ~]# vim /etc/ssh/sshd_config
......
#UseDNS yes
UseDNS no
......
[root@test1 ~]#
[root@test1 ~]# systemctl restart sshd
[root@test1 ~]#

ansible 批量修改 UseDNS

[root@test1 tidb]# ansible -i hosts.ini all -m shell -a "sed -i 's/\#UseDNS yes/UseDNS no/g' /etc/ssh/sshd_config" -b

[root@test1 tidb]# ansible -i hosts.ini all -m shell -a "systemctl restart sshd" -b
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章