LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   Access Denied when connecting to centos VPS via SSH (https://www.linuxquestions.org/questions/linux-server-73/access-denied-when-connecting-to-centos-vps-via-ssh-847655/)

xezesis 12-01-2010 05:11 AM

Access Denied when connecting to centos VPS via SSH
 
Whenever i try to create a account either then the root and login as it i get a error Access is Denied if though the password is correct.

/pub/beer/ 12-01-2010 08:50 AM

I'm assuming you are getting a login when you attempt to SSH to the VPS? The first part is making sure you can actually connect to it, if you get the login prompt that should be good. The other aspect would be making sure the users (non root) have a valid shell and can login normally.

If you can not log in as root, but can as other users:
Check /etc/ssh/sshd_config for "PermitRootLogin no"

If you can not log in as any users check, this is mostly how user based access is controlled via SSH.
/etc/hosts.allow for mention of sshd
/etc/hosts.deny for mention of sshd
/etc/ssh/sshd_confif for "AllowUsers" and "DenyUsers"

xezesis 12-01-2010 03:55 PM

Quote:

Originally Posted by jschwenn (Post 4177084)
I'm assuming you are getting a login when you attempt to SSH to the VPS? The first part is making sure you can actually connect to it, if you get the login prompt that should be good. The other aspect would be making sure the users (non root) have a valid shell and can login normally.

If you can not log in as root, but can as other users:
Check /etc/ssh/sshd_config for "PermitRootLogin no"

If you can not log in as any users check, this is mostly how user based access is controlled via SSH.
/etc/hosts.allow for mention of sshd
/etc/hosts.deny for mention of sshd
/etc/ssh/sshd_confif for "AllowUsers" and "DenyUsers"

Now I understand what you're saying so should I now go look to see what those files are set to? Once I've checked will report back anyway

xezesis 12-01-2010 06:44 PM

I really need someone to help me with this i really made a mistake in purchasing this VPS i should have got abit of Linux knowledge first but can someone help me please

erenay 04-18-2012 11:07 AM

if you have an AllowUsers command in your /etc/sshd_config, you should include the root user.
i.e. the following configuration does not allow root to login via ssh:
Code:

PermitRootLogin yes
AllowUsers ayse fatma hayriye



All times are GMT -5. The time now is 12:31 PM.