- 注册notepad++的 CR LF格式,转换成unix
- 修改防火墙 firewall.sh
sudo apt update && sudo apt upgrade -y
sudo apt -y install firewalld
firewall-cmd --state
firewall-cmd --list-all
firewall-cmd --get-services
sudo systemctl start firewalld
sudo systemctl enable firewalld
#sudo systemctl status firewalld
#firewall
firewall-cmd --permanent --add-port=22/tcp
firewall-cmd --permanent --add-port=80/tcp
firewall-cmd --permanent --add-port=443/tcp
firewall-cmd --permanent --add-port=8000-10000/tcp
firewall-cmd --reload
sudo systemctl restart firewalld
firewall-cmd --list-all
sed -i "s/\#Port 22/Port 9022/g" /etc/ssh/sshd_config
#sed -i "s/\#UseDNS yes/UseDNS no/g" /etc/ssh/sshd_config
#sed -i "s/GSSAPIAuthentication yes/GSSAPIAuthentication no/g" /etc/ssh/sshd_config
#sed -i "s/\#PermitRootLogin yes/PermitRootLogin no/g" /etc/ssh/sshd_config
systemctl restart sshd
#install semanage
#yum -y install policycoreutils-python
#semanage port -a -t ssh_port_t -p tcp 9022
#systemctl restart sshd