RSS

Problem accessing server via SSH

13 Jan

While doing SSH with correct details we get Access denied quite strange!! but you can elimivnate the error with ease cgheck the /var/log/messaages

You might see following error in the error logs:
===========================================================================================
su(pam_unix)[17977]: session opened for user root by (uid=0)
PAM-shells[23966]: /etc/shells is either world writable or not a normal file
sshd: sshd shutdown succeeded
===========================================================================================
Now just check the permission of /etc/shells on the server.
You might see
[root@vpxxx~]# 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@vpxxx~]# ls -ld /etc/shells
-rwxr-xr-x  1 root root 32 Aug 31 07:46 /etc/shells

Just make the permission to 755 thats it now log into your server via SSH bingo you are in. 😉

Advertisements
 
Leave a comment

Posted by on January 13, 2012 in Uncategorized

 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

 
%d bloggers like this: