ssh closes after i authenticate

blitzer

Verified User
Joined
May 12, 2009
Messages
35
Hi,

I have a weird problem, hope someone can help give some solutions or advice.
I just migrated directadmin from an old server (fedora core) to a new cent os machine.

After the migration was complete, all data restored and i was happy

Then i found that when i ssh into my new server, the session closes right after i key in the user (admin) and password.
I did a 'passwd admin' to reset the password however it still doesnt work.

I know its not a password issue because i can login to the directadmin control panel using the admin account.
 
Check for errors in /var/log/messages. More then likely the user isnt in allowedusers in sshd_config
 
Thanks for your reply.

I did check the log messages but nothing came out.

Also the allowedusers has been added when I did the migration.

I have tried adding other users and ssh in with no issues but prefer to have only admin in the root wheel group.

Any other advice or suggestions?
 
The admin user needs to be a real user, with a real home directory (/home/admin) and a real shell set in the /etc/passwd file.

And of course the permissions in /home/admin need to be right.

Jeff
 
The admin user needs to be a real user, with a real home directory (/home/admin) and a real shell set in the /etc/passwd file.

And of course the permissions in /home/admin need to be right.

Jeff



Hi Jeff,

Yes the admin user is a real user with a real home directory.
I can see the admin user in /etc/passwd.

However i am still unable to ssh in without the session closing on me.
I dare not remove the admin account and recreate it because its account in DA is holding 2 of my main domains.

Any other advice?
 
There must be some kind of error somewhere in /var/log/messages, /var/log/auth.log, /var/log/secure, etc.
Most likely the admin user doesn't have a valid shell, is not listed in the AllowUsers list within /etc/ssh/sshd_config or has a .bashrc/.profile file in his home directory that exits with an error. This last case is the only one not showing any error in the log files.
 
Back
Top