因为我安装了DenyHosts,所以如果我想通过sshlogin到我的服务器,我得到错误“ssh_exchange_identification”。 如果我查找/etc/hosts.deny我发现我的IP在那里。 我怎么能防止我的IP每次都在里面呢?
也许你testing了拒绝主机应该阻止用户的一个条件,例如以root身份login。 这里是你可以做什么来重置hosts.deny文件,这样你就可以再次login(从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 DenyHosts
把自己放在/etc/hosts.allow。 处理顺序如下,匹配后停止:
创build一个名为WORK_DIR / allowed-hosts的文件并input您的IP。 重新启动Denyhosts。