Can't access to 'admin' on SSH

Aar

Verified User
Joined
Feb 10, 2005
Messages
209
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.
 
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.
 
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.
 
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.
 
I just had the same issue. Got 3 domains directly under Admin (but they were moved during the backup/restore).
Were you able to pinpoint what/where the problem was?
 
Back
Top