使用 kerberos 无需密码的 SSH 登录

pfn*_*sel 6 ssh authentication kerberos

我尝试登录到仅支持使用 kerberos 身份验证登录的服务器。这是我的尝试:

kinit user@FOO.ORG
aklog -c foo.org
ssh server
Run Code Online (Sandbox Code Playgroud)

但后来我又被要求输入密码。

这是我在~/.ssh/config条目中的内容server(我的/etc/ssh/ssh_config是空的):

Host server
    HostName someserver.foo.org
    User user
    ForwardX11 yes
    ForwardX11Trusted yes
    GSSAPIAuthentication yes
    GSSAPIDelegateCredentials yes
Run Code Online (Sandbox Code Playgroud)

据同事说,这(或类似的东西)对他们有用。我可以用 kerberos 令牌登录到其他机器上就好了。我认为它与我的/etc/krb5.conf,但我不知道要寻找什么。我尝试/etc/krb5.conf从服务器复制到我的工作站,但没有成功。

如果我运行,这是输出的一部分ssh -vvv server

debug1: Next authentication method: gssapi-with-mic
debug1: Unspecified GSS failure.  Minor code may provide more information
Server not found in Kerberos database

debug1: Unspecified GSS failure.  Minor code may provide more information
Server not found in Kerberos database

debug1: Unspecified GSS failure.  Minor code may provide more information


debug2: we sent a gssapi-with-mic packet, wait for reply
Run Code Online (Sandbox Code Playgroud)

如何使用本地 kerberos 令牌登录?我究竟做错了什么?

Bla*_*sso 2

您可能需要通过为机器本身创建主体来将服务器添加到 kerberos 数据库(又名 KDC)。

如果您正在使用 KDC 运行 Windows Active Directory,则可以使用 ktpass.exe 将主机添加到 KDC。

如果您运行的是 Windows 或 Linux Kerberos KDC,则可以在 Linux shell 中使用 ktutil 命令来访问 kerberos 数据库的主体。