title: ssh: User not allowed shell does not exist
body: <ul>
  <li>Apache</li>
  <li>CentosOS 5</li>
  <li>Plesk 10</li>
  </ul>
  
  <p>New on commandline and ssh.</p>
  
  <p>While trying to get several users (root git friend) to ssh to the same shell and configuring passwordless connection I must have made a mistake.</p>
  
  <p>I can <strong>no longer login over ssh as root</strong> or git but can as friend whose shell I transferred by editting etc/passwd. 
  I luckily can still login on plesk so gui file editing is possible. </p>
  
  <p>here's what I found in my sshd errorlog</p>
  
  <pre><code>sshd[11999]: User git not allowed because shell /bin/bash\r does not exist
  sshd[12000]: input_userauth_request: invalid user git
  sshd[11999]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=xxx.xxx.xxx.dynamic.upc.nl  user=git
  sshd[11999]: Failed password for invalid user git from xxx.xxx.xxx port 54851 ssh2
  </code></pre>
  
  <p>I read something about sudo ing and incidently entering: causing the \r
  But where to restore?
  Here are some configurations</p>
  
  <p>etc/ssh/sshd_config :</p>
  
  <pre><code>PubkeyAuthentication yes
  </code></pre>
  
  <p>ect/shells</p>
  
  <pre><code>/bin/sh
  /bin/bash
  /sbin/nologin
  /bin/tcsh
  /bin/csh
  /bin/false
  /usr/local/psa/bin/chrootsh
  /bin/rbash
  </code></pre>
  
  <p>etc/passwd</p>
  
  <pre><code>git:x:10009:10009::/home/git:/bin/bash
  friend:x:10010:10010::/home/git:/bin/bash
  </code></pre>
  
  <p>earlier I tried to install password less connecting
  so there is a .ssh/id_rsa file somewhere on the server and on my local machine.</p>
  
  <p>After reading <a href="https://stackoverflow.com/questions/5335197/gits-famous-error-permission-to-git-denied-to-user">Git&#39;s famous &quot;ERROR: Permission to .git denied to user&quot;</a> </p>
  
  <p>I tried</p>
  
  <pre><code>ssh-add -l
  Could not open a connection to your authentication agent
  </code></pre>
  
  <p>My problem resembles this:
  <a href="https://serverfault.com/questions/480806/ssh-root-access-denied-after-changing-shell">https://serverfault.com/questions/480806/ssh-root-access-denied-after-changing-shell</a></p>
  
  <p>If I am logged over ssh as friend I cannot sudo to root: </p>
  
  <pre><code>sudo root 
  friend is not in the sudoers file
  </code></pre>
  
  <p>nor can I chsh</p>
  
  <pre><code>[friend@vpsXXX ~]$ chsh -s /bin/bash root
  chsh: Running UID doesn't match UID of user we're altering, shell change denied
  </code></pre>
  
  <p>Hope someone can clear this up for me.</p>
  
  <p>Happy to supply more info if needed</p>