title: Configure Git with SSH for Phabricator
body: <p>I'm trying to configure SSH for Phabricator to get git running. I've followed this <a href="https://secure.phabricator.com/book/phabricator/article/diffusion_hosting/#configuring-ssh">manual</a> but when I call <code>echo {} | ssh git@phabricator.mydomain.com conduit conduit.ping</code> I always get an empty result or <code>Permission denied (publickey,keyboard-interactive).</code>.</p>
  
  <p><strong><code>/etc/ssh-phabricator/sshd_config</code></strong>:</p>
  
  <pre><code>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
  </code></pre>
  
  <p><strong><code>/etc/passwd</code></strong>:</p>
  
  <pre><code>phd:x:999:999::/var/tmp/phd:/bin/false
  git:x:1005:1005::/home/git:/bin/bash
  </code></pre>
  
  <p><strong><code>/etc/shadow</code></strong>:</p>
  
  <pre><code>phd:!:16135::::::
  git:NP:16135:0:99999:7:::
  </code></pre>
  
  <p><strong><code>/etc/sudoers</code></strong>:</p>
  
  <pre><code>git ALL=(phd) SETENV: NOPASSWD: /usr/bin/git-upload-pack, /usr/bin/git-receive-pack, /bin/false
  </code></pre>
  
  <p><strong><code>~/.ssh/config</code></strong>:</p>
  
  <pre><code>Host phabricator.mydomain.com
      HostName phabricator.mydomain.com
      Port 22
      IdentityFile /c/Users/.../.ssh/id_rsa_phabricator
      PreferredAuthentications publickey
      User git
  </code></pre>
  
  <p><strong>UPDATE</strong></p>
  
  <p>The reasons for my problems were:</p>
  
  <ul>
  <li>I didn't use the SSH key with the client.</li>
  <li>I didn't ensure that the <code>git</code> user has a shell.</li>
  </ul>