6

I have an SSH server running on my Raspberry PI with ALARM (up to date). My user "gitroot" is meant to use the git-shell. However, when I set /usr/bin/git-shell as shell for gitroot in /etc/passwd, I can't login with that user anymore. su - gitroot works as expected. When I change the shell to /bin/bash, I can login as gitroot via ssh.

The permissions of /usr/bin/git-shell and /bin/bash are the same. I tried changing the password, it didn't change anything. Output from journalctl -f:

Jul 23 09:05:27 netberry sshd[4213]: pam_unix(sshd:auth): authentication failure;logname= uid=0 euid=0 tty=ssh ruser= rhost=localhost.localdomai...r=gitroot
Jul 23 09:05:40 netberry sshd[4213]: Failed password for gitroot from 127.0.0.1 port 51969 ssh2
Jul 23 09:07:25 netberry sshd[4213]: Connection closed by 127.0.0.1 [preauth]
Jul 23 09:07:29 netberry sshd[4222]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=localhost.localdomai...r=gitroot
Jul 23 09:07:43 netberry sshd[4222]: Failed password for gitroot from 127.0.0.1 port 51970 ssh2
Jul 23 09:08:07 netberry sshd[4222]: Failed password for gitroot from 127.0.0.1 port 51970 ssh2
Jul 23 09:08:08 netberry sshd[4222]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=localhost.localdomai...r=gitroot
Jul 23 09:08:10 netberry sshd[4222]: Failed password for gitroot from 127.0.0.1 port 51970 ssh2
Jul 23 09:08:10 netberry sshd[4222]: Connection closed by 127.0.0.1 [preauth]

The log shows multiple attempts to log in as gitroot over ssh from the host itself (I just typed ssh gitroot@localhost into the console).

migrated from stackoverflow.com Jul 23 '13 at 16:21

This question came from our site for professional and enthusiast programmers.

  • 3
    Did you add /usr/bin/git-shell to /etc/shells if at all necessary? – Coroos Jul 23 '13 at 8:30
  • 1
    Noo, i didnt. After i did, it worked. Thank you! If you want to post an answer with that, i will accept it because it solved the problem. – Oznerol256 Jul 23 '13 at 8:36
4

As mentioned in the comments, you should add /usr/bin/git-shell to /etc/shells.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.