1,Vi /etc/ssh/sshd_config

2、重启iptables执行下面命令:service iptables restart

                                          centos 7:systemctl start firewalld.service