小编Yas*_*ika的帖子

Openssh Connection不能与AuthorizedKeysCommand一起使用

我在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
Run Code Online (Sandbox Code Playgroud)

ssh-keys用户可以执行该文件(/ authorizedkeys/authorized-keys).但我不能ssh到服务器; ssh git@myserver.com

在auth.log中我可以看到这一行,

error: Unsafe AuthorizedKeysCommand: bad ownership or modes for directory /
Run Code Online (Sandbox Code Playgroud)

如果我给/ authorizedkeys/authorized-keys文件授予770权限,我会收到以下错误,

error: Unsafe AuthorizedKeysCommand: bad ownership or modes for file /authorizedkeys/authorized-keys
Run Code Online (Sandbox Code Playgroud)

我尝试使用root作为AuthorizedKeysCommandUser并更改/ authorizedkeys/authorized-keys文件的权限和所有者.它也没用.

我在ubuntu 14.04上使用OpenSSH_6.6.1p1.

注意:我可以使用authorized_keys文件ssh

ssh openssh ssh-keys

0
推荐指数
1
解决办法
5022
查看次数

标签 统计

openssh ×1

ssh ×1

ssh-keys ×1