我有一个 Ubuntu EC2 实例,我通过 ssh 密钥对通过 SSH 连接。
当我尝试重新启动 systemd 时,它会提示输入密码,而我没有。我不相信我设置了一个,我不知道它会是什么,因为我使用密钥对作为 ubuntu 用户进行连接:
ubuntu@ip-172-31-35-37:~$ systemctl daemon-reload
==== AUTHENTICATING FOR org.freedesktop.systemd1.reload-daemon ===
Authentication is required to reload the systemd state.
Authenticating as: Ubuntu (ubuntu)
Password:
polkit-agent-helper-1: pam_authenticate failed: Authentication failure
==== AUTHENTICATION FAILED ===
Failed to execute operation: Access denied
Run Code Online (Sandbox Code Playgroud)
我怎样才能使这项工作?