CentOS, Security

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

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s