You always need to think in terms of how can we secure server so that it will not be targeted by the hacker. Here is the simple trick is to restrict users in ssh configuration to secure the server.
By default ssh configuration accepts all the users to the server, that’s the biggest loop hole in secure server environment. We can change or restrict this to only to certain users in the configuration so that our server becomes secure server.
So here is a trick to secure server,
- Open the ssh configuration file.
[root@kalwa1 ~]# vi /etc/ssh/sshd_config
- Now add following lines in the file
This line states that only root user can able to login to secure server rest of the users will be denied.