VPS侦探论坛

 找回密码
 注册
查看: 6402|回复: 4

请问自己被DenyHosts挡住怎么办

[复制链接]
发表于 2011-3-23 14:46:51 | 显示全部楼层 |阅读模式

我安装好DenyHosts后, 登出ssh, 然后就进不去了,
可能自己被DenyHosts挡住了.
请问有无解决方法?
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
发表于 2011-3-23 16:29:57 | 显示全部楼层

回复 1# 的帖子



通过控制面板的console进去,把黑名单里的ip删除
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
发表于 2011-3-26 20:11:41 | 显示全部楼层

不行的,删除后会自动添加ip的。
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
发表于 2011-3-26 20:12:43 | 显示全部楼层



老大,如何停掉denyhost?
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
发表于 2011-3-26 23:41:35 | 显示全部楼层

解决方法如下:
Step # 1: Stop DenyHosts

# /etc/init.d/denyhosts stop

Step # 2: Remove Your IP From /etc/hosts.deny

# vi /etc/hosts.deny

Delete your IP address. Save and close the file.

Step # 3: Remove Your IP From /usr/share/denyhosts/data Directory

Cd to /usr/share/denyhosts/data
# cd /usr/share/denyhosts/data

You need to edit the following files using vi and remove the lines containing the IP address. Save the file.

hosts
hosts-restricted
hosts-root
hosts-valid
users-hosts
If you've static IP address add to allowed-hosts file. Any IP address that appears in this file will not be blocked by default (consider this as a whilelist):
# echo '1.2.3.4' >> allowed-hosts

Step # 4: Start DenyHosts

# /etc/init.d/denyhosts start

军哥运维代购:http://shop63846532.taobao.com/

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

本版积分规则

小黑屋|手机版|Archiver|VPS侦探 ( 鲁ICP备16040043号-1 )

GMT+8, 2024-10-18 16:31 , Processed in 0.026574 second(s), 16 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

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