Linux系統安裝好,建立普通用戶後,普通用戶不一定能通過ssh連接到服務器
可以在/etc/ssh/sshd_config中增加AllowUsers:username(可以多個,空格分開)給普通用戶增加ssh權限
也可以設置允許和拒絕ssh的用戶/用戶組:
DenyUsers:username,DenyGroups:groupname
優先級如下:
DenyUsers:username
AllowUsers:username
DenyGroups:groupname
AllowGroups:groupname
在給普通用戶設立ssh權限後,即可將root ssh權限禁用,增加安全性(也可以在sshd_config中將PermitRootLogin 選項修改為:PermitRootLogin no)