我在Linux机器上安装了Kerberos v5服务器,当连接到其他主机(使用samba,ldap或ssh)时,它运行得非常好,在kerberos数据库中有主机。
我可以使用Kerberos来validation本地主机吗? 如果可以的话,我有什么理由不应该? 我没有为本地主机制作一个kerberos校长。 我不认为我应该; 相反,我认为校长应该解决机器的全hostname
。 那可能吗?
理想情况下,我只想在一台服务器上configuration它(无论是Kerberos,DNS还是ssh),但是如果每台机器都需要一些自定义configuration,那也可以。
例如$ ssh -v localhost
... debug1: Unspecified GSS failure. Minor code may provide more information Server host/[email protected] not found in Kerberos database ...
编辑:
所以我有一个糟糕的/ etc / hosts文件。 如果我没有记错的话,我用Ubuntu获得的原始版本有两个127.0。 IP地址,如下所示: –
127.0.0.1 localhost 127.0.*1*.1 hostname
因为没有很好的理由,我很久以前就改变了我的想法:
127.0.0.1 localhost 127.0.*0*.1 hostname.example.com hostname
这似乎一切正常,直到我尝试了与Kerberos ssh(最近的努力)。 不知怎的,这个configuration导致sshd将机器的kerberos主体parsing为“host / localhost @ \ n”,我认为这是有道理的,如果它使用/ etc / hosts进行正向和反向dns查找优先于外部dns。 所以我评论了后一行,sshd神奇地开始用gssapi-with-mic进行validation。 真棒。 (然后我调查了localhost,问了这个问题)
你可以使用名字规范化。
修改/etc/hosts
使其类似于:
127.0.0.1 hostname.domain.tld hostname localhost ::1 hostname.domain.tld hostname localhost
这种方式localhost – > 127.0.0.1 – > hostname.domain.tld,服务器有一个keytab条目。
您将不得不在每台服务器上执行此操作。