Open ssh config file # vim /etc/ssh/sshd_config
#PermitRootLogin yes
Replace this line by:
PermitRootLogin no
In this file we can also change the "Port number" and "Banner" details as well and much more.
# service sshd restart
after when we login as "root" user it will show "Access denied" message.
Now login as a normal user and switch as root.
#PermitRootLogin yes
Replace this line by:
PermitRootLogin no
In this file we can also change the "Port number" and "Banner" details as well and much more.
# service sshd restart
after when we login as "root" user it will show "Access denied" message.
Now login as a normal user and switch as root.
No comments:
Post a Comment