Restricting SSH access to given users

From Notes_Wiki
Revision as of 04:48, 16 October 2014 by Saurabh (talk | contribs) (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...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

<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/LDAP domain, it may be desired to allow SSH access only for few users. To achieve that use following steps:

  1. Edit /etc/ssh/sshd_config as follows:
    1. Append 'AllowUsers <usernames>'
  2. Use 'service sshd restart'

Similarly to allow everyone except a few users 'DenyUsers' can be used.