Changing SSH port on CentOS 7
Normally, one adds or changes a SSH port by changing "Port" in /etc/ssh/sshd_config:
#Port 22 Port 26271
On Centos 7 however, this won't work, and sshd will exit when restarted with the following in /var/log/secure:
sshd: error: Bind to port 26271 on 184.108.40.206 failed: Permission denied.
This is because of SELinux restrictions.
To allow a different SSH port in SELinux, do:
semanage port -a -t ssh_port_t -p tcp 26271
If you're getting "bash: semanage: command not found" error, you have to install an additional package with it:
yum install policycoreutils-python