我在stackoverflow.com中也问了同样的问题,并被告知这是一个更好的问问题的地方。我正在运行一个Ubuntu 13.10。除了我的笔记本电脑,我可以使用SSH连接到它(MacBook,2007年,OSX10.6.8)。OpenSSH是使用端口安装的。
当我试图连接到服务器时,它总是被添加到host.deny中。不过,可以用denyhost活动连接到我校的服务器。当我连接到大学服务器时,也可以使用相同的命令连接到我的服务器。
/var/log/denyhost:
2014-08-31 22:49:28,183 - denyhosts : INFO new denied hosts: ['xxx.xxx.xxx.xxx']
2014-08-31 22:49:28,183 - denyhosts : INFO new suspicious logins: ['username - xxx.xxx.xxx.xxx']
2014-08-31 22:49:58,283 - denyhosts : INFO new suspicious logins: ['username - xxx.xxx.xxx.xxx']/etc/denyhosts.conf
SECURE_LOG = /var/log/auth.log
HOSTS_DENY = /etc/hosts.deny
PURGE_DENY = 1y
BLOCK_SERVICE = sshd
DENY_THRESHOLD_INVALID = 5
DENY_THRESHOLD_VALID = 10
DENY_THRESHOLD_ROOT = 1
DENY_THRESHOLD_RESTRICTED = 1
WORK_DIR = /var/lib/denyhosts
SUSPICIOUS_LOGIN_REPORT_ALLOWED_HOSTS=YES
HOSTNAME_LOOKUP=YES
LOCK_FILE = /run/denyhosts.pid
ADMIN_EMAIL = root@localhost
SMTP_HOST = localhost
SMTP_PORT = 25
SMTP_FROM = DenyHosts <nobody@localhost>
SMTP_SUBJECT = DenyHosts Report
AGE_RESET_VALID=5d
AGE_RESET_ROOT=25d
AGE_RESET_RESTRICTED=25d
AGE_RESET_INVALID=10d
DAEMON_LOG = /var/log/denyhosts
DAEMON_SLEEP = 30s
DAEMON_PURGE = 1h是什么导致了这种奇怪的行为,我该如何解决呢?
发布于 2014-09-01 11:29:16
你可以试着白名单你的IP:
sudo vi /etc/hosts.allow
Add (w/o quotes): "sshd: 1.2.3.4"另外,检查/etc/denyhosts.conf中的选项,看看是否有您想要更改的内容。
您还可以卸载denyhost,如果它带来的危害大于好处(apt-get remove denyhosts),或者调整denyhosts.conf阈值,使之更加轻松。
编辑:denyhost的常见问题是我见过的最全面的。
https://serverfault.com/questions/625453
复制相似问题