# SSH安全防护一则

**URL:** <https://forum.90sec.com/t/topic/2822>\
**Category:** 技术文章\
**Created:** [2011 年11 月 2 日 01:55 UTC](https://forum.90sec.com/t/topic/2822 "2011-11-02T01:55:18Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

作者： ![Agile](https://forum.90sec.com/user_avatar/forum.90sec.com/agile/32/11326_2.png) [@Agile](https://forum.90sec.com/u/Agile)\
发布日期： [2011 年11 月 2 日 01:55 UTC](https://forum.90sec.com/t/topic/2822/1 "2011-11-02T01:55:18Z")

</div>

用到的软件：DenyHosts

软件官网：[http://denyhosts.sourceforge.net/](http://denyhosts.sourceforge.net/)

自己去下吧

下载 解压 安装 我会把整个过程记录下来的 方便大家学习LINUX安全

# tar -zxvf DenyHosts-2.6.tar.gz

#cd DenyHosts-2.6

#python setup.py install

/usr/share/denyhosts/ #DenyHosts 默认安装目录

# cp denyhosts.cfg-dist denyhosts.cfg

denyhosts.cfg #DenyHosts配置文件

# cp daemon-control-dist daemon-control

#chmod 700 daemon-control

# chown root daemon-control

#...../daemon-control 运行了

修改/etc/rc.loacl文件 让它每次重新启动机器就启动daemon-control

#vi /etc/rc.local

加入usr/share/denyhosts/daemon-control start 这条命令

接着在去查看日志吧 HOHO

# tail -f /var/log/secure

附图一张

[1.png](https://forum.90sec.com/discuz-migration/attachments/60659fc270dc3d7e96aa8fb95b41be00758c94855f5279628ed401164b311e79)[2.png](https://forum.90sec.com/discuz-migration/attachments/c1c0f6759ad0d2cdde736ee342a59421d1e9f5b29c69f5947260dc699bfaa5e1)

[更多学习记录请访问hi.baidu.com/90seclinux](http://xn--hi-222cl63b9xcx6hd0out5e5da4x409f.baidu.com/90seclinux) 嘿嘿 一起学习进步

---

<div class="post-metadata">

作者： ![cfking](https://forum.90sec.com/letter_avatar_proxy/v4/letter/c/3da27b/32.png) [@cfking](https://forum.90sec.com/u/cfking)\
发布日期： [2011 年11 月 2 日 08:46 UTC](https://forum.90sec.com/t/topic/2822/2 "2011-11-02T08:46:24Z")

</div>

哈，支持王子JJ

---

<div class="post-metadata">

作者： ![Agile](https://forum.90sec.com/user_avatar/forum.90sec.com/agile/32/11326_2.png) [@Agile](https://forum.90sec.com/u/Agile)\
发布日期： [2011 年11 月 2 日 09:19 UTC](https://forum.90sec.com/t/topic/2822/3 "2011-11-02T09:19:24Z")

</div>

\*\*回复 [2#](http://www.90sec.org/redirect.php?goto=findpost&pid=3073&ptid=540) _落叶_ \*\*

```
嘿嘿 祝90SEC越办越好

```

---

<div class="post-metadata">

作者： ![cfking](https://forum.90sec.com/letter_avatar_proxy/v4/letter/c/3da27b/32.png) [@cfking](https://forum.90sec.com/u/cfking)\
发布日期： [2011 年11 月 2 日 09:46 UTC](https://forum.90sec.com/t/topic/2822/4 "2011-11-02T09:46:56Z")

</div>

{:4\_62:} 看看表情

---

<div class="post-metadata">

作者： ![c11](https://forum.90sec.com/letter_avatar_proxy/v4/letter/c/71e660/32.png) [@c11](https://forum.90sec.com/u/c11)\
发布日期： [2011 年11 月 10 日 13:02 UTC](https://forum.90sec.com/t/topic/2822/5 "2011-11-10T13:02:29Z")

</div>

放暴力破解。呵呵、、
