unix

How do I only allow specific users the ability to ssh to my server?

To only allow specific users to ssh to our server, you can add the following line to your sshd_config file:

AllowUsers usera userd userf

You can also use the AllowGroups option.

AllowGroups admins webmasters

In order for the changes to take effect, you will need to restart or reload sshd.

service sshd

Click to comment

Leave a Reply

Your email address will not be published. Required fields are marked *

To Top