Hot Article
- Centos7 closes and restarts the system firewall and opens firewall ports
- How IID server uses Xshell to connect to Linux (centos) server
- BT panel forgets the background login URL, and the solution to the security entrance verification failure
- The php domain name points to ip, how to use the specified ip address to access a server in the url request domain name in curl mode
- Error connecting to MySQL: Cant connect to MySQL server (10060)
- How to purchase a dedicated server
How to modify the remote port in CentOS 7 and 8
- Author:杰克
- Category:Server Maintain
- Release Time:2022-11-06
1. SSH remote login server
2. Enter (change port policy, allow firewall through policy, restart ssh):
(Example: port 2245)
sed -i 's/^Port.*/Port 2245/' /etc/ssh/sshd_config
firewall-cmd --zone=public --add-port=2245/tcp --permanent
firewall-cmd --reload
systemctl restart sshd
3. Re-login to SSH
4. CentOS7 and 8 complete the port modification operation
related topic
- Windows Server 2008 R2 server environment installation graphic tutorial
- How to do if phpstudy port 80 is occupied (perfect solution)
- IID.HK shares some commonly used IT network online detection websites
- linux how to change the user password (linux command to change the password)
- How to solve the Windows 10 prompt "The built-in administrator cannot activate this application"?
- What is the meaning of servererror500 (there is servererror500 solution)