allow specific user to ssh code example
Example: allow users ssh
Step # 1: Open sshd_config file
# sudo vi /etc/ssh/sshd_config
Step # 2: Add a user
Only allow user vivek to login by adding following line:
AllowUsers vivek
Step # 3: Restart sshd
Save and close the file. In the above example, user vivek has already been created on the system. Now just restart sshd:
# sudo systemctl restart sshd.service