- #!/bin/bash
- echo root:xxxxxxxx|sudo chpasswd root
- sudo sed -i ‘s/^#?PermitRootLogin.*/PermitRootLogin yes/g’ /etc/ssh/sshd_config;
- sudo sed -i ‘s/^#?PasswordAuthentication.*/PasswordAuthentication yes/g’ /etc/ssh/sshd_config;
- sudo service sshd restart
- echo ‘DNS=8.8.8.8 1.1.1.1 2001:4860:4860::8888 2001:4860:4860::8844’>> /etc/systemd/resolved.conf
- systemctl restart systemd-resolved
- systemctl enable systemd-resolved
- mv /etc/resolv.conf /etc/resolv.conf.bak
- ln -s /run/systemd/resolve/resolv.conf /etc/
- apt-get purge netfilter-persistent -y
- reboot
复制代码
|