vi /etc/ssh/sshd_config firewall-cmd --permanent --zone=public --add-port=xxx/tcp firewall-cmd --reload systemctl restart sshd.service when failed to restart, yum install policycoreutils-python semanage port -a -t ssh_port_t -p tcp xxxx systemctl restart sshd.service
artilla's personal blog. Sorry for broken English, just in practice