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
- How to purchase a dedicated server
- Error connecting to MySQL: Cant connect to MySQL server (10060)
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
- How does CentOS7 open/view ports?
- What is the meaning of servererror500 (there is servererror500 solution)
- How to change the password of Windows server 2008 server?
- What to do if a cp: omitting directory error occurs in Linux (detailed solution)
- How to restart the Redis service command
- IDGlobal teaches you to disable ICMP protocol on CentOS