Monday, January 19, 2009

SSH Whitelist users/groups

We can harden SSH Server by allow only certain users to use this service. This process is known as whitelisting.

To create a whitelist, you need the user name of the people who will be allowed to use SSH to remotely access the server. Then, follow these steps.

1. Add this line to your sshd_config file:

#Allow only certain users
AllowUsers username1 username2 username2

Alternately, you can allow groups access to SSH logins by using

#Allow only certain groups
AllowGroups group1 group2

2. Save the ssh_config file.

3. Restart the services by type:
service ssh restart

No comments:

 
Custom Search