關掉 RPi 的密碼登入功能


$ cd /etc/ssh
$ nano sshd_config
加入以下三行
PasswordAuthentication no
ChallengeResponseAuthentication no
UsePAM no

存檔
重新啟動 ssh 服務
sudo systemctl restart ssh

最後你可以在 terminal 開另外一個 tab 來驗證是否成功:
ssh pi@your-ip -o PubKeyAuthentication=no
pi@your-ip: Permission denied (publickey).


留言

這個網誌中的熱門文章

電話線四芯或二芯(4C或2C)的差別

開機自動執行 Google Chrome App on Mac OS X