ssh: User not allowed shell does not exist
- CentosOS 5
- Plesk 10
New on commandline and ssh.
- Git remote end hung up unexpectedly
- Config git server: "fatal: '/C/Users/khanh/test.git' does not appear to be a git repository
- Change GitLab SSH host
- git clone asking for password (multiple users)
- How can I run git push/pull commands with SSH verbose mode?
- Store SSH key passphrase persistently
I can no longer login over ssh as root 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.
here’s what I found in my sshd errorlog
sshd: User git not allowed because shell /bin/bash\r does not exist sshd: input_userauth_request: invalid user git sshd: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=xxx.xxx.xxx.dynamic.upc.nl user=git sshd: Failed password for invalid user git from xxx.xxx.xxx port 54851 ssh2
I read something about sudo ing and incidently entering: causing the \r
But where to restore?
Here are some configurations
/bin/sh /bin/bash /sbin/nologin /bin/tcsh /bin/csh /bin/false /usr/local/psa/bin/chrootsh /bin/rbash
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.
After reading Git's famous "ERROR: Permission to .git denied to user"
ssh-add -l Could not open a connection to your authentication agent
My problem resembles this:
If I am logged over ssh as friend I cannot sudo to root:
sudo root friend is not in the sudoers file
nor can I chsh
[friend@vpsXXX ~]$ chsh -s /bin/bash root chsh: Running UID doesn't match UID of user we're altering, shell change denied
Hope someone can clear this up for me.
Happy to supply more info if needed
One Solution collect form web for “ssh: User not allowed shell does not exist”
means that you’ve edited the /etc/passwd or /etc/shells with a Windows editor as it contains Windows line feeds
\r\n. Linux interprets only the
\n and assumes that the remaining
\r is part of the binary name.
Solution: Open the files in a Linux editor and remove the new line and add it again.
Also you could install the package
tofrodos and execute:
fromdos /etc/passwd fromdos /etc/shells