Search This Blog

2010-10-17

Restrict SSH Access to Specific Users

An easy way to restrict access of SSH to selected users on a specific subnet:

sudo nano /etc/ssh/sshd_config

Add the lines:
AllowUsers andy@192.168.1.*,1.2.3.4,5.6.7.8 billy@192.168.1.* charlie@192.168.1.*

Alternatively you can use the DenyUsers command to restrict users from accessing ssh.

No comments:

Post a Comment