【发布时间】:2015-02-22 08:43:40
【问题描述】:
我在 sshd_config 中添加了这些行
AuthorizedKeysCommand /authorizedkeys/authorized-keys
AuthorizedKeysCommandUser ssh-keys
-rwxr-x--- 1 root ssh-keys 712 Dec 23 22:36 /authorizedkeys/authorized-keys
-rwxr-x--- 1 root ssh-keys 712 Dec 23 22:36 authorized-keys
ssh-keys 用户可以执行文件(/authorizedkeys/authorized-keys)。 但我不能 ssh 到服务器; ssh git@myserver.com
在 auth.log 中我可以看到这一行,
error: Unsafe AuthorizedKeysCommand: bad ownership or modes for directory /
如果我向 /authorizedkeys/authorized-keys 文件授予 770 权限,我会收到以下错误,
error: Unsafe AuthorizedKeysCommand: bad ownership or modes for file /authorizedkeys/authorized-keys
我尝试使用 root 作为 AuthorizedKeysCommandUser 并更改了 /authorizedkeys/authorized-keys 文件的权限和所有者。它也没有工作。
我在 ubuntu 14.04 上使用 OpenSSH_6.6.1p1。
注意:我可以使用 authorized_keys 文件进行 ssh 操作
【问题讨论】: