更改端口
在/etc/ssh/sshd_config
中更改Port=22
字段
重启服务
service sshd restart
关闭防火墙
一般
service iptables stop
centos
systemctl stop firewalld.service
禁止防火墙启动
systemctl disable firewalld.service
在/etc/ssh/sshd_config
中更改Port=22
字段
service sshd restart
service iptables stop
systemctl stop firewalld.service
systemctl disable firewalld.service