When your try to SSH fro mthe server with correct details but getting
Access denied error! No worries you can elimivnate the error with simple way, check the /var/log/messaages
You might see following error in the error logs:
[root@support007 ~]#su(pam_unix)[18964]: session opened for user root by (uid=0)
PAM-shells[43566]: /etc/shells is either world writable or not a normal file
sshd: sshd shutdown succeeded
Then you need to check the permission of /etc/shells on the server.
You will see
[root@support007 ~]# ls -ld /etc/shells
-rwxrwxrwx 1 root root 32 Jun 18 20:17 /etc/shells
here the permisions are incorrect the permission must be 755 i.e
[root@support007 ~]# ls -ld /etc/shells
-rwxr-xr-x 1 root root 32 Aug 31 07:46 /etc/shells

Set the permission to 755 that’s it Try to login into your server via SSH you are in 😀