Changes to the SSH port today, the discovery of the change after the sshd service does not take effect, the test sshd port changed to 1024 below the port does not take effect, change to 1024 and more ports can take effect.
This is strange, as long as the port does not conflict, the SSH port theoretically can be modified to any value. However, it is said that we are advised to use more than 1024 of the port, is this really the reason? Restart the system to try or not, suddenly think of a thing-selinux. Is this a mess? Use the command Getenforce to see that SELinux is on, use the Setenforce 0 command to shut it down temporarily, and then change the port to a port less than 1024 in the/etc/ssh/sshd_config file, and restart the sshd service. Use the netstat command to view Port discovery. It's really a problem with SELinux.
To permanently close the SELinux method:
Vi/etc/sysconfig/selinux change selinux=enforcing to Selinux=permissive or selinux=disabled
This article is from the "Gan mu" blog, please be sure to keep this source http://ganmu.blog.51cto.com/9305511/1891160
CentOS6.5 changing SSH port issues