CentOS 6.10修改SSH端口笔记

 1 year ago
source link: https://www.itpwd.com/328.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
CentOS 6.10修改SSH端口笔记_Linux笔记_IT密码
[[email protected] ~]# vim /etc/ssh/sshd_config 
#Port 22
Port 18022 #新增ssh端口
[[email protected] ~]# service sshd restart
[[email protected] ~]# 
[[email protected] ~]# vi /etc/sysconfig/iptables
-A INPUT -p tcp -m state --state NEW -m tcp --dport 22 -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport 18022 -j ACCEPT #新增防火墙端口
[[email protected] ~]# service iptables restart

About Joyk

Aggregate valuable and interesting links.
Joyk means Joy of geeK