服务器 Gind.cn

服务器问题集锦,包括 Linux(Ubuntu, Centos,Debian等)和Windows Server服务器

从sshd调用sss_ssh_authorizedkeys时返回错误代码13

我正在使用configuration了SSH密钥的FreeIPA服务器添加到用户。 我试图让服务器使用来自IPA服务器的ssh密钥进行身份validation,所以我不必pipe理许多authorized_keys文件。 我可以确认这些密钥是sss_ssh_authorizedkeys <user>使用sss_ssh_authorizedkeys <user>添加和检索的,在查询时会为每个用户返回相应的密钥。 但是,当sshd运行该命令时, sss_ssh_authorizedkeys失败,错误代码为13。 我的testing系统是我的CentOS IPA服务器。 我将下面的代码片段添加到了我的sshd_config来启用这个configuration: AuthorizedKeysCommand /usr/bin/sss_ssh_authorizedkeys AuthorizedKeysCommandUser nobody 我也尝试了AuthorizedKeysCommandUser作为根,以确保它不是一个权限问题。 我GOOGLE了我的错误,从IRC归档返回一个单一的结果,最终的结果(从我能告诉)是解决scheme通过电子邮件发送给提问者。 我认为这可能是SELinux的一个问题(在Web服务器场景中困扰着我),但是search“ ssh ”,“ sshd ”或“ authorizedkeys ”并没有产生任何我看不到的东西。 我在阅读身份validation日志方面也不是很擅长,所以我不排除把SELinux作为罪魁祸首。 以下是IPA框中由sshd -ddd生成的日志片段: Connection from 10.77.1.198 port 56579 on 10.77.1.20 port 22 debug1: Client protocol version 2.0; client software version OpenSSH_7.5 debug1: match: OpenSSH_7.5 pat OpenSSH* compat 0x04000000 debug1: Enabling compatibility mode […]