1.修改SSH远程登陆端口为 8888html
# vi /etc/ssh/sshd_config服务器
Port 8888 #把 #Port 22 修改成 Port 8888ssh
# servicesshd restart #重启SSH服务 或者 service sshd restarttcp
二、防火墙添加端口spa
默认下iptables只开启了一部分端口,使用额外端口如 8888 须要在iptables中添加白名单 否则你会链接不上SSH服务器的rest
# iptables -I INPUT -p tcp --dport 8888 -j ACCEPThtm
# iptables -A INPUT -p tcp --dport 8888 -j ACCEPTseo
#service iptables saveip
第一条命令即时生效但重启后会失效,因此须要保存该命令到iptables配置文件中,路径:/etc/sysconfig/iptables,
保存的命令也能够 :iptables-save >/etc/sysconfig/iptables
get
iptables的一些知识 :
该文章转自:www.chinaes-seo.com