说明:修改端口可以增加被入侵的难度,提高VPS安全性!
1、修改端口 使用xshell或者putty登录VPS,默认的VPS一般是22端口
vi /etc/ssh/sshd_config
将port后面的端口22数字修改成任意的5个数字
2、重启SSH
#CentOS系统
service sshd restart
#Debian/Ubuntu系统
service ssh restart
3、特别提示 有些时候为了确保还需要设定防火墙是否开启
/sbin/iptables -I INPUT -p tcp --dport 28888(你修改的端口) -j ACCEPT
/etc/init.d/iptables save
我们可以用iptables -L -n
检查端口是否开启
本文系转载,前往查看
如有侵权,请联系 cloudcommunity@tencent.com 删除。
扫码关注腾讯云开发者
领取腾讯云代金券
Copyright © 2013 - 2025 Tencent Cloud. All Rights Reserved. 腾讯云 版权所有
深圳市腾讯计算机系统有限公司 ICP备案/许可证号:粤B2-20090059 深公网安备号 44030502008569
腾讯云计算(北京)有限责任公司 京ICP证150476号 | 京ICP备11018762号 | 京公网安备号11010802020287
Copyright © 2013 - 2025 Tencent Cloud.
All Rights Reserved. 腾讯云 版权所有