編輯其配置檔案,輸入以下指令進行修改:
ee /etc/ssh/sshd_config然後進行修改.
找到
#PasswordAuthentication no 修改為:
PasswordAuthentication yes
這段的意思是,讓SSH使用密碼驗證登陸.
#PermitRootLogin no 修改為
PermitRootLogin yes
這段的意思是,讓SSH準許root使用者登入.一般來說,為了安全起見,這一段還是不要允許的好.不過安全要求不高,可以這樣做.
#PermitEmptyPasswords no修改為
PermitEmptyPasswords no這段的意思是,使得允許空密碼成為不可用,換句話說就是,不允許空密碼登陸.