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
- What to do if a cp: omitting directory error occurs in Linux (detailed solution)
- How to confirm whether the ip is blocked or polluted?
- How to change pycharm to Chinese (pycharm set Chinese detailed tutorial)
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
- Merge the /home directory into the / directory under CentOS
- How To Install Plesk Panel on Ubuntu 20.04 Server?
- How to modify the remote port in CentOS 7 and 8
- windows timer task settings (with shutdown restart command)
- IDGlobal teaches you how to set up root remote login in Ubuntu SSH
- How to install the system on the game server host?