树莓派取消开机ssh提示
在使用树莓派默认用户密码登录系统时,会提示:
SSH is enabled and the default password for the ‘pi’ user has not been
changed. This is a security risk - please login as the ‘pi’ user and
type ‘passwd’ to set a new password.
如下图所示
取消提示的方式
1.直接修改默认密码
使用命令
sudo passwd pi
会让你输入新密码,输入新密码后会让你再次输入新密码进行确认,输入完成(两次密码一致),密码就修改成功了。再次登录就不会出现上面的提示信息了。
2.删除源文件(sshpwd.sh)
文件 sshpwd.sh 在/etc/profile.d/目录下
切换到该目录下,如果想保留该文件的信息可以先进行备份再进行删除。
执行如下命令
cd /etc/profile.d
sudo cp sshpwd.sh sshpwd.sh.bak
sudo rm sshpwd.sh
再次使用pi账户进行登录就不会有相应提示啦。