我一直在使用 Google Cloud debian 虚拟机,并且使用 sudo 执行超级用户任务完全没有问题(sudo 不要求输入密码)。
今天我像往常一样通过 SSH 连接,当我尝试sudo 某些操作时,它开始要求输入密码:
We trust you have received the usual lecture from the local System
Administrator. It usually boils down to these three things:
#1) Respect the privacy of others.
#2) Think before you type.
#3) With great power comes great responsibility.
[sudo] password for -----:
Run Code Online (Sandbox Code Playgroud)
根据文档,它不应要求输入密码,因为已经是 SSL 密钥身份验证的连接。