我正在为Phabricator配置SSH以使git运行。我跟踪了这个manual,但是当我调用echo {} | ssh git@phabricator.mydomain.com conduit conduit.ping时,总是得到一个空的结果或Permission denied (publickey,keyboard-interactive).。
/etc/ssh-phabricator/sshd_config
AuthorizedKeysCommand /usr/libexec/ssh-phabricator-hook
AuthorizedKeysCommandUser git
Port 22
Protocol 2
PermitRootLogin no
AllowAgentForwarding no
AllowTcpForwarding no
PrintMotd no
PrintLastLog no
PasswordAuthentication no
AuthorizedKeysFile none/etc/passwd
phd:x:999:999::/var/tmp/phd:/bin/false
git:x:1005:1005::/home/git:/bin/bash/etc/shadow
phd:!:16135::::::
git:NP:16135:0:99999:7:::/etc/sudoers
git ALL=(phd) SETENV: NOPASSWD: /usr/bin/git-upload-pack, /usr/bin/git-receive-pack, /bin/false~/.ssh/config
Host phabricator.mydomain.com
HostName phabricator.mydomain.com
Port 22
IdentityFile /c/Users/.../.ssh/id_rsa_phabricator
PreferredAuthentications publickey
User git更新
我出现问题的原因是:
git用户有一个shell。发布于 2014-03-18 20:50:35
您的ssh钩子工作正常-首先,您应该确保git ssh用户能够将ssh连接到正常的ssh守护进程--这将确保您可以与该用户一起登录。
更有可能的是,您有一个糟糕的主目录或糟糕的shell,如注释中所述。
如果所有这些都运行良好,请确保将ssh密钥上传到您的配置文件中,并确保您正在使用此键进行连接。
发布于 2015-03-10 19:33:18
需要注意的另一件事是,路径必须对AuthorizedKeysCommand具有正确的权限,否则也会导致
Permission denied (publickey,keyboard-interactive)发布于 2016-05-19 09:44:24
我撞到了
Permission denied (publickey,keyboard-interactive)问题也出现了,并发现了另一个尚未在这里提及的原因: SELinux。
如果您在服务器上使用带有“强制”策略的SELinux,您可能会遇到同样的问题。若要检查SELinux是否负责,请设置
$ setenforce 0并尝试
$ echo {} | ssh git@phabricator.mydomain.com conduit conduit.ping再来一次。
如果突然起作用,但不希望永久禁用SELinux或以许可模式运行它,则可以使用audit2allow来解决服务器最近遇到的问题:
$ ausearch -m avc -ts recent | audit2allow -M local
$ semodule -i local.pp该搜索从SELinux日志(通常为/var/ log /audit.log)打印最近的条目,audit2allow为标记为拒绝的条目创建策略。确保日志中没有您不想允许的最近条目。
https://stackoverflow.com/questions/22236640
复制相似问题