CentOS - How to Allow Only Specific Users to Login Using SSH

How to allow only specific users to login using SSH
To make your server secured when using SSH services, not every users need to be able to gain ssh service on your server. You can specify which user can connect to the server by changing the configuration file in server.

In your terminal, find this file:
/etc/ssh/sshd_config

For example, if you only allow user "michael" to connect to the server, add in the line below:
AllowUsers michael

Finally, save your setting. Done

Comments