首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >DenyHosts -每一次我都会阻止自己

DenyHosts -每一次我都会阻止自己
EN

Server Fault用户
提问于 2010-12-30 19:24:59
回答 3查看 1.5K关注 0票数 2

由于我安装了DenyHosts,如果我想通过ssh登录到我的服务器,就会得到错误"ssh_exchange_identification“。如果我查找/etc/hosts.deny,我就会在里面找到我的IP。我怎么才能防止我的IP每次被插在里面?

EN

回答 3

Server Fault用户

回答已采纳

发布于 2010-12-30 19:35:40

可能您测试了denyhost应该阻止用户的条件之一,例如以root身份登录。以下是重置hosts.deny文件的方法,以便您能够再次登录(从DenyHosts FAQ):

代码语言:javascript
复制
Stop DenyHosts
Remove the IP address from /etc/hosts.deny
Edit WORK_DIR/hosts and remove the lines containing the IP address. Save the file.
Edit WORK_DIR/hosts-restricted and remove the lines containing the IP address. Save the file.
Edit WORK_DIR/hosts-root and remove the lines containing the IP address. Save the file.
Edit WORK_DIR/hosts-valid and remove the lines containing the IP address. Save the file.
Edit WORK_DIR/user-hosts and remove the lines containing the IP address. Save the file.
(optional) Consider adding the IP address to WORK_DIR/allowed-hosts
Start DenyHosts

http://denyhosts.sourceforge.net/faq.html#3_19

票数 3
EN

Server Fault用户

发布于 2010-12-30 19:35:38

把自己放进/etc/主机。允许。处理顺序如下,在匹配之后停止:

  • 根据/etc/hosts.low中的规则授予访问权限
  • 根据/etc/hosts.deny中的规则拒绝访问
  • 准许进入。
票数 2
EN

Server Fault用户

发布于 2010-12-30 19:59:51

创建一个名为WORK_DIR/ named主机的文件,并输入您的IP。重启丹尼豪斯。

票数 1
EN
页面原文内容由Server Fault提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://serverfault.com/questions/217509

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档