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
- ubuntu 20.04 newbie installation tutorial
- How to view user login logs in the IID server Linux system?
- Debian system installation yum command
- Windows Server 2008 R2 server environment installation graphic tutorial
- How to restart the Redis service command
- Windows Server system prompts that the account is disabled when accessing shares