记一次服务器被爆破 防护历程

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/weixin_37361758/article/details/80446888

在腾讯云搞了一个云主机, 安装了宝塔的服务, 第三天登陆 后台发现有两个ip在爆破root 密码, 虽然对自己的密码强度比较自信, 但是被人惦记也是很难受。决定做点什么 。。。。
直接进入正题:
1. 最基本的建议就是:平时登陆和工作的时候都使用普通用户进行操作 直接禁用root 登陆ssh, 有很多hk都在恶意爆破 root shh 直接k掉。
在sshd_config中修改如下就可以了:

PermitRootLogin no
    附: 添加普通用户
adduser user

gpasswd -a user sudo
// 添加用户,并且加入sudo

2.直接了当的方法, ssh秘钥, 具体操作方法 直接上大佬的 博客
自己写的也不清楚, 参照一下大佬。

3.DenyHosts : 个人认为是比较高效的,针对密码爆破的防护工具 具体安装 不再多写。
4.推荐一些关于ssh 的 东西吧
http://www.ibm.com/developerworks/cn/aix/library/au-sshsecurity/ IBM的各种介绍
http://erik-2-blog.logdown.com/posts/74081-ssh-principle SSH原理
http://skypegnu1.blog.51cto.com/8991766/1641064 SSH原理和基本使用
http://zhezhang.co/2015/01/deploy-ghost-on-digitalocean/ 部署ghost
http://blog.csdn.net/oncoding/article/details/4365062 SSH连接过程
https://blog.urfix.com/25-ssh-commands-tricks/ SSH小技巧
http://spenserj.com/blog/2013/07/15/securing-a-linux-server/ Securing a Linux Server 对服务器整体的安全提供方案。
http://www.lovelucy.info/vps-anti-ssh-login-attempts-attack.html 防爆破
https://mos.meituan.com/library/?tag=Ubuntu 美团云知识库
http://wiki.ubuntu.org.cn/OpenSSH%E9%AB%98%E7%BA%A7%E6%95%99%E7%A8%8B openssh 高级设置
https://www.linux.com/learn/advanced-ssh-security-tips-and-tricks linux.com文章
http://tool.oschina.net/commons?type=7 TCP/UDP常见端口
http://tool.chinaz.com/port/ 通过扫描工具查看自己的服务器端口开放状态

猜你喜欢

转载自blog.csdn.net/weixin_37361758/article/details/80446888