Sharing Knowledge | System Admin Articles

Limit SSH Access for Users

How do you limit the access to the SSH for different users in Linux server?

We can use “Match” in the OpenSSH configuration file. Add the Match directive in your sshd_config followed by a criteria which you want to block (User, Group, Address or Host).

The following example limits TCP and X11 port forwarding for the user "testuser":

AllowTcpForwarding no

X11Forwarding no

Match User jack

AllowTcpForwarding yes

X11Forwarding yes

Hope this helps..!

Labels: Linux, SSH

My Profile PhotoAbout the Author

I'm Parthiban, An UNIX System Admin by Profession. I'm Experienced in Linux/Unix System Administration and Scripting. I have done lot of work on the infrastructure Mgmt side in Linux, UNIX and Windows system administration, Hardware, Storage and Data center. I'm blogging since 2008.
Follow Me On Twitter or On Facebook

0 Comments for "Limit SSH Access for Users"

What do you think about this Article? Add your Opinion..!

Back To Top