In this post we are going see How to disable ssh login for root user
Some hackers will try to brute force your root password, enable ssh login for root user is a very big security issue. so to avoid this situtaion, please use local user for login via ssh then simply use sudo to switch as a root user.
step 1:- I have created the user called firtsuser
step 2:- assigning password for that newly created user
step 3:- open /etc/ssh/sshd_config file find the line with "PermitRootLogin yes" in it to disable logging in through ssh as root please make like this "PermitRootLogin no".
step 4:- check ssh port is listening
sep 5:- Restart the sshd service
No comments:
Post a Comment