Page MenuHomePhabricator

cannot ssh. permission denied.
Closed, ResolvedPublic

Asked by A117 on Nov 12 2015, 8:13 AM.

Details

I have read configuration manual so many times. Diffusion User Guide: Repository Hosting
I have redirect my ssh to port 222 and when I try to ssh to new port 22, it replies,

Permission denied (publickey,keyboard-interactive).

debugged sshd gives me,

debug3: subprocess: AuthorizedKeysCommand command "/etc/ssh/phabricator-ssh-hook.sh git" running as git
debug1: temporarily_use_uid: 1002/1002 (e=0/0)
debug1: restore_uid: 0/0
debug3: subprocess: AuthorizedKeysCommand pid 4101
debug1: temporarily_use_uid: 1002/1002 (e=0/0)
debug2: key not found
AuthorizedKeysCommand /etc/ssh/phabricator-ssh-hook.sh git failed, status 127
debug1: restore_uid: 0/0
Failed publickey for git from ... port ...ssh2: RSA SHA256:...
debug3: mm_answer_keyallowed: key 0x... is not allowed

If user git runs "/opt/phabricator/phabricator/bin/ssh-auth git", it does well show my public key.
my daemon-user and vcs-user are same, git, which is an account on my Ubuntu.
my Phabricator web user account is named pha and I have uploaded the publick key of my personal account on my Ubuntu, which is named al, to this web user.
my Phabricator/bin/phd is running by user git.
Help please...

Answers

A117
Updated 3,570 Days Ago

permission problem.
If I change the owner of phabricator-ssh-hook.sh to git, sshd will complain it is unsafe. So it must be root. Yet, user git is requested to execute this script in sshd_config.phabricator. So I changed the group of the script to git. Its permission is 750.

New Answer

Answer

This question has been marked as closed, but you can still leave a new answer.