LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 1096|回复: 7

能不能设置sshd非法访问报警

[复制链接]
发表于 2005-9-1 14:00:20 | 显示全部楼层 |阅读模式
最近发现我自己的服务器的sshd端口有恶意访问,请问能不能在这些访问开始的时候就报警,如发邮件等。
发表于 2005-9-1 16:06:04 | 显示全部楼层
改到一个乱七八糟的端口。基本上就没有这种乱试密码的bot暴力登陆了。
回复 支持 反对

使用道具 举报

发表于 2005-9-1 21:21:39 | 显示全部楼层
1.use allowusers to restrict users
2.disable password authentication
2.use hosts.allow and deny to restrict host
3.use logcheck to send out alert(not only ssh,other weird staff in log)
回复 支持 反对

使用道具 举报

发表于 2005-9-1 22:06:15 | 显示全部楼层
只采用 key 认证方式,绝对没人能攻破。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2005-9-2 19:50:16 | 显示全部楼层
3.use logcheck to send out alert(not only ssh,other weired staff in log)

请问这个怎么做啊?
回复 支持 反对

使用道具 举报

发表于 2005-9-2 21:35:21 | 显示全部楼层
apt-get install logcheck

default setup is very usable,if new attack is attempted you'll receive email like this


This email is sent by logcheck. If you wish to no-longer receive it,                                                                                          
you can either deinstall the logcheck package or modify its                                                                                                   
configuration file (/etc/logcheck/logcheck.conf).                                                                                                            
                                                                                                                                                              
Security Events                                                                                                                                               
=-=-=-=-=-=-=-=                                                                                                                                               
Aug 13 15:02:08 host sshd[2318]: Illegal user admin from 82.165.249.31                                                                                    
Aug 13 15:02:10 host sshd[2347]: Illegal user admin from 82.165.249.31                                                                                    
Aug 13 15:02:11 host sshd[2384]: Illegal user admin from 82.165.249.31                                                                                    
Aug 13 15:02:12 host sshd[2400]: Illegal user admin from 82.165.249.31                                                                                    
Aug 13 15:02:26 host sshd[2673]: Illegal user admin from 82.165.249.31                                                                                    
Aug 13 15:05:16 host sshd[2970]: Illegal user admin from 82.165.249.31                                                                                    
Aug 13 15:05:17 host sshd[2972]: Illegal user admin from 82.165.249.31                                                                                    
Aug 13 15:05:19 host sshd[2976]: Illegal user admin from 82.165.249.31                                                                                    
Aug 13 15:05:21 host sshd[2978]: Illegal user admin from 82.165.249.31                                                                                    
Aug 13 15:05:22 host sshd[2980]: Illegal user admin from 82.165.249.31                                                                                    
.....
回复 支持 反对

使用道具 举报

 楼主| 发表于 2005-9-4 11:45:34 | 显示全部楼层
非常感谢。
回复 支持 反对

使用道具 举报

发表于 2007-5-15 15:21:07 | 显示全部楼层
不是很明白.
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表