步驟如下:
1.編輯/etc/ssh/sshd_config配置文件:vi /etc/ssh/sshd_config
2.在/etc/ssh/sshd_config配置文件添加:AllowUserselles(表示允許elles通過ssh登錄服務器系統)
3.保存退出后,重啟sshd服務即可:systemctl restart sshd.service
拒絕指定用戶ssh登錄(黑名單):|
步驟如下:
1.編輯/etc/ssh/sshd_config配置文件:vi /etc/ssh/sshd_config
2.在/etc/ssh/sshd_config配置文件添加:DenyUsers elles