Difference between revisions of "Restricting SSH access to given users"
From Notes_Wiki
(Created page with "<yambe:breadcrumb>OpenSSH_server_configuration|OpenSSH</yambe:breadcrumb> =Restricting SSH access to given users= Sometimes on lab machines or machines which are part of AD/L...") |
m |
||
Line 1: | Line 1: | ||
[[Main Page|Home]] > [[CentOS]] > [[CentOS 6.x]] > [[OpenSSH server configuration]] > [[Restricting SSH access to given users]] | |||
Sometimes on lab machines or machines which are part of AD/LDAP domain, it may be desired to allow SSH access only for few users. To achieve that use following steps: | Sometimes on lab machines or machines which are part of AD/LDAP domain, it may be desired to allow SSH access only for few users. To achieve that use following steps: | ||
Line 8: | Line 7: | ||
Similarly to allow everyone except a few users 'DenyUsers' can be used. | Similarly to allow everyone except a few users 'DenyUsers' can be used. | ||
[[Main Page|Home]] > [[CentOS]] > [[CentOS 6.x]] > [[OpenSSH server configuration]] > [[Restricting SSH access to given users]] |
Latest revision as of 09:44, 14 July 2022
Home > CentOS > CentOS 6.x > OpenSSH server configuration > Restricting SSH access to given users
Sometimes on lab machines or machines which are part of AD/LDAP domain, it may be desired to allow SSH access only for few users. To achieve that use following steps:
- Edit /etc/ssh/sshd_config as follows:
- Append 'AllowUsers <usernames>'
- Use 'service sshd restart'
Similarly to allow everyone except a few users 'DenyUsers' can be used.
Home > CentOS > CentOS 6.x > OpenSSH server configuration > Restricting SSH access to given users