📜  允许用户 ssh - Shell-Bash 代码示例

📅  最后修改于: 2022-03-11 14:50:43.435000             🧑  作者: Mango

代码示例1
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