centos 修改ssh端口,以支持vsftp

vi /etc/ssh/sshd_config ssh

Port 22tcp

Port 2225
執行/etc/init.d/sshd restart   啓動SSH服務,這樣SSH端口將同時工做與22和2225上。
spa

 

若是開啓了防火牆,那麼開放對應的端口rest

vi /etc/sysconfig/iptables ip

-A INPUT -m state --state NEW -m tcp -p tcp --dport 2225 -j ACCEPT it

/etc/init.d/iptables restarttable

 

若是嫌開通端口麻煩,能夠直接關閉CentOS 6.5防火牆class

[root@localhost ~]#service iptables stop --臨時關閉防火牆
[root@localhost ~]#chkconfig iptables off --永久關閉防火牆iptables

相關文章
相關標籤/搜索