Replies: 1 comment
|
不建议把 sudo 密码发给 AI 或放进聊天上下文里,尤其是你说的中转站场景,密码很容易进入日志/请求记录。 更稳的做法是给 Operit/AI 使用一个专门的低权限 SSH 用户,然后在 VPS 上用 sudo -n systemctl restart nginx
可以在 VPS 上手动创建一个 sudoers 片段,例如: sudo visudo -f /etc/sudoers.d/operit-ai写入类似下面的内容: 注意几点:
所以答案是:不要通过聊天框交 sudo 密码;用“专用用户 + 受限 NOPASSWD sudoers + |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
ai每次使用ssh工具连接vps时,都无法通过ssh工具包进行sudo,只能把密码在聊天框中发给ai,这样如果用的是中转站就会造成泄露,有没有更好的方法
All reactions