Linux修改端口
添加/修改端口
vi /etc/ssh/sshd_config
//进入文件修改端口
Port 22 #修改你需要的端口号
#AddressFamily any
AddressFamily inet
firewall-cmd --zone=public --add-port=80/tcp --permanent
(–permanent永久生效,没有此参数重启后失效)
firewall-cmd --reload
//重新载入
firewall-cmd --zone=public --remove-port=80/tcp --permanent
//删除
service sshd restart
//重启SSH服务