
[Ubuntu伺服器]
我幾天來都能正常登入伺服器。現在我無法使用 root 使用者登錄,密碼和私鑰都不起作用。
幸運的是,我目前以 root 使用者身分登入。基本上,我以 root 用戶身份登錄,並且已經做了幾個小時的事情,然後我轉到另一個終端登錄,但它不起作用。我收到「權限被拒絕,請重試」。
在 /etc/ssh/sshd_config 我有這個設置
"PermitRootLogin yes".
在authorized_keys中我仍然設定了我的公鑰
ssh-ed25519 AA...{it's the whole key in they file}...Ddw
因為我沒有更改有關登入選項的任何內容。最好的假設是有人進入了系統。好的,很好,但現在仍然存在問題,為什麼我無法登錄,因為我所做的是更改密碼
passwd root
更改後我嘗試登入但無法登入。
這是 ssh -vvv 的輸出 影像