首先 进入/etc/ssh 然后vim sshd_config
port 这个就是ssh登录的端口号
然后让防火墙放行你要修改的端口,修改的端口最好在1000以上
firewall-cmd --state【firewalld是否运行】
firewall-cmd --permanent --list-port【查看端口列表】
firewall-cmd --permanent --zone=public --add-port=10055/tcp【添加端口】
firewall-cmd --permanent --remove-port=10055/tcp【删除端口】
最后重启一下ssh服务即可
centos系统防更改ssh登录的服务端口
最新推荐文章于 2024-08-27 14:52:40 发布