
我在 sshd_config 中將 PermitRootLogin 更改為 yes 以作為 root 連接到我的伺服器,但我無法工作,因為我是 ubuntu 新手,我不知道如何製作它,請幫助我
答案1
您還需要提供一種驗證 root 使用者身分的方法 - 透過啟用 root 密碼(不建議 - 出於安全原因)或為 root 建立公鑰-私鑰對。
如果您選擇後者,您也可以更改PermitRootLogin yes
為PermitRootLogin prohibit-password
- iirc 無論如何都是預設值。