1、vi /etc/ssh/ssh_config
#添加兩個遠程端口,是爲了防止修改出錯導致 22 也登不上就麻煩了
Port 22
Port 8094
保存
2、vi /etc/ssh/sshd_config
Port 22
Port 8094
保存
3、iptables -I INPUT -p tcp --dport 8094 -j ACCEPT
防火牆上開端口
service iptables save
service sshd restart
service iptables restart