由于我安装了DenyHosts,如果我想通过ssh登录到我的服务器,就会得到错误"ssh_exchange_identification“。如果我查找/etc/hosts.deny,我就会在里面找到我的IP。我怎么才能防止我的IP每次被插在里面?
发布于 2010-12-30 19:35:40
可能您测试了denyhost应该阻止用户的条件之一,例如以root身份登录。以下是重置hosts.deny文件的方法,以便您能够再次登录(从DenyHosts FAQ):
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 DenyHostshttp://denyhosts.sourceforge.net/faq.html#3_19
发布于 2010-12-30 19:35:38
把自己放进/etc/主机。允许。处理顺序如下,在匹配之后停止:
发布于 2010-12-30 19:59:51
创建一个名为WORK_DIR/ named主机的文件,并输入您的IP。重启丹尼豪斯。
https://serverfault.com/questions/217509
复制相似问题