How to change SSHd listening port on Centos 7

Edit /etc/ssh/sshd_config –> Port 12345
yum -y install policycoreutils-python
semanage port -a -t ssh_port_t -p tcp 12345
systemctl restart sshd

Nota: this is for use on a dedicated server or KVM, OpenVZ only apply the first and last line.