allowusers add
Specifies and controls which users can access SSH services.
Product
All
Privilege
Security Administrator
Mode
Exec > Global Configuration > Context Configuration > SSH Configuration
configure > context context_name > server sshd
Entering the above command sequence results in the following prompt:
[local]host_name(config-sshd)#
Syntax
[ default | no ] allowusers add user_list
default
Unrestricted access for all users.
no
Removes the list of user name patterns resulting in unresticted access by all users.
user_list
Specifies a list of user name patterns, separated by spaces, as an alphanumeric string of 1 through 999 characters. If the pattern takes the form 'USER' then login is restricted for that user. If the pattern is in the format 'USER@IP_ADDRESS' then USER and IP address are separately checked, restricting logins to those users from that particular iIP address.
-
The maximum length of this string is 3000 bytes including spaces.
-
The maximum number of allowusers, which is counted by spaces, is 256, which is consistent with the limit from OpenSSH.
Important |
If you exceed either of the above limits, an error message is displayed. The message prompts you to use a regular expression pattern to shorten the string, or remove all the allowusers with no allowusers add or default allowusers add and re-configure. |
Important |
For more details about how to create complex rules, see the OpenSSH sshd_config man page. add - Add more users to the list of user name patterns. |
Usage Guidelines
Use this command to specify and control which users can access SSH services.
Access to a service may be restricted to users having a legitimate need. This restriction applies on a white-list basis: only explicitly allowed users shall connect to a host via SSH and possibly from a specified source IP addresses. Under OpenSSH, the AllowUsers directive of sshd_config specifies a list of SSH authorized users and groups.
Example
allowusers add user1 user2@10.1.1.1 user3@10.1.1.2 user4