I checked the port modification records in the simple security settings of VPS in the tribe, and they are still in the centos6.* era. The port modification in CentOS7.* has relatively more steps and is more troublesome. In order to avoid forgetting and having to look for it occasionally, I recorded it down for my own convenience. 1. Add a new port This step is the same as centos6.*, modify the configuration file. [root@ ~]# vi /etc/ssh/sshd_config Find #Port 22, remove the # in front and add a new line Port 1234 (1234 is the new port, specify it yourself), then save and exit. 2. Open new ports in the firewall [root@ ~]# firewall-cmd --zone=public --add-port=1234/tcp --permanent #1234 refers to the new port [root@~]# firewall-cmd --reload If you are trying it for a short period of time, you can also turn off the firewall. 3. Add ssh port to SELinux [root@ ~]# yum provides semanage #Install management tools [root@ ~]#yum -y install policycoreutils-python #Install dependent packages [root@ ~]#semanage port -l | grep ssh #Query ssh port [root@ ~]#semanage port -a -t ssh_port_t -p tcp 1234 #Add ssh port to SELinux [root@ ~] #systemctl restart sshd.service #Restart sshd service This step can also turn off SElinux [root@ ~]# vi /etc/selinux/config Change SELINUX=enforcing to SELINUX=disabled, save the settings, and reboot. |
>>: Hostodo: 36% off Spokane VPS, West Coast data center, starting at $12 per year
Both IP addresses and MAC addresses identify devi...
China's 5G construction is in full swing. Acc...
RepriseHosting (AS62838) is still promoting its d...
You can activate 5G services without changing you...
[[420999]] 1. Background If only the canvas tag i...
The report on the economic operation of the commu...
Since 2018, the gap between traffic volume and re...
Misconception 1: 5G is a revolution that will rep...
DesiVPS has released two promotional packages, wh...
[[422256]] AT&T's plan to shut down its 3...
[[328614]] The global economy has been put on hol...
In order to implement the deployment requirements...
On October 20, the Ministry of Industry and Infor...
For the past two decades, network architectures h...
It has been a while since I shared information ab...