我在一台舊筆記型電腦上安裝了 Debian Squeeze 作為測試平台。我已經安裝了 OpenSSH 並編輯/etc/ssh/sshd_config
為使用 ssh 金鑰並禁止密碼身份驗證。
不過,我可以透過 serFISH.com 使用密碼登入。輸入密碼後我得到:
Connecting as lemmy@*myipaddress* on port 5001...
/root/.ssh/known_hosts updated.
Original contents retained as /root/.ssh/known_hosts.old
lemmy@my*ipaddress*'s password:
Linux saturn 2.6.32-5-686 #1 SMP Sun May 6 04:01:19 UTC 2012 i686
The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Sun Aug 26 11:20:12 2012 from 78.47.79.193
lemmy@saturn:~$`
這怎麼可能?
答案1
作為基本規則 :
修改設定檔後不要忘記重新啟動/重新載入/停止啟動服務。
此外,您應該始終在修改設定檔之前對其進行手動備份:這可以縮短出現問題時的回滾時間。