disbale ssh for bnroot as root account

Posted by user2916639 on Server Fault See other posts from Server Fault or by user2916639
Published on 2014-08-23T09:06:55Z Indexed on 2014/08/23 10:22 UTC
Read the original article Hit count: 156

Filed under:
|
|
|

i am beginner with centos - Linux i have dedicated server . my root username is bnroot . now i am taking ssh using this user. i want to disable ssh for bnroot. i have created user user name welcome i want take ssh login by welcome user then i ll use su - bnroot to get root privileges. i have set PermitRootLogin no , AllowUsers welcome IN /etc/sshd_config and after restarting sshd service . i take ssh login by welcome use then it is ok. but when i use su bnroot its prompt to password and i enter right passowrd it show su: incorrect password , i dont know where i am wrong . please help me here.

changes i done -

/etc/ssh/sshd_confid
PermitRootLogin no
AllowUsers welcome

/etc/sudoers
welcome ALL=(ALL)       ALL

getting error in /var/log/secure

unix_chkpwd[666]: password check failed for user (bnroot)
su: pam_unix(su:auth): authentication failure; logname=ewalletssh uid=503 euid=500 tty=pts/1 ruser=ewalletssh rhost=  user=bnroot

please let me know where i am wrong

© Server Fault or respective owner

Related posts about linux

Related posts about centos