CentOS7 Add or Modify SSH Ports

2021-12-10 / 1 Comments / 659 Reading / Checking whether to include

Vim Edit SSH Configuration

 vim /etc/ssh/sshd_ config

Find "# Port 22", directly type "yyp" in this line, copy this line to the next line, and then remove the comments in the two lines and change them to

 Port 22 Port 10086

The default listening port of SSH is 22. If you do not force other ports to be specified, "Port 22" is an open 22 access port. I reserved port 22 above to prevent access to port 22 from becoming impossible due to various permissions and configuration problems. When everything is OK, close port 22.

Restart the server

 shutdown -r now


The blogger has closed comments on all pages