📅  最后修改于: 2022-03-11 14:50:43.435000             🧑  作者: Mango
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