Can't access to 'admin' on SSH

Aar

Verified User
Joined
Feb 10, 2005
Messages
99
Location
Netherlands
I have a strange problem. I can't acces to my 'admin' account on SSH? I see in DirectAdmin that SSH is on for this user.
But when i login by SSH, i see the error: "Access denied".

Other users are no problem, also root uplifting from a user is no problem. What is wrong?
The bash-history for admin seems ok, with no strange things.
 

ditto

Verified User
Joined
Apr 27, 2009
Messages
2,557
I would guess you also can't access regular FTP on the admin user? If so, you can solve it by adding a domain under the admin user, then delete the domain again. Then it should work.
 

ditto

Verified User
Joined
Apr 27, 2009
Messages
2,557
Adding and deleting a domain under user admin, is a fix to make FTP work for admin account. However I am not sure if it matters for SSH. But if you do not have any domains under admin, it would not hurt to test if it helps. Just add a domain under admin and delete it, it might fix the SSH access, or might not.
 

Richard G

Verified User
Joined
Jul 6, 2008
Messages
4,513
Location
Maastricht
FTP for the admin user works fine. Only SSH for 'admin' doesn't works....
Check if user admin is in your sshd config file.
For Centos 7 it's /etc/ssh/sshd_config and then at the bottom it should say:
AllowUsers root
AllowUsers admin

at least when you have a domain under the admin user.

If not present you can add the second line, restart SSH and try again. However, maybe it's better if it works to restart DA, change some unimportant thing on the admin account (like disable cgi), save and see if the line stays in there or gets deleted again.
 
Top