致命错误:需要提示输入连接或 sudo 密码(主机:xyz),但输入不明确 正在中止

发布于 2025-01-11 21:29:10 字数 162 浏览 1 评论 0原文

fab -P -H xyz disable_puppet

在堡垒服务器中运行 fab 命令以禁用 xyz 服务器中的 puppet 时,我收到错误为致命错误:执行任务“disable_puppet”中止时一台或多台主机失败。

fab -P -H xyz disable_puppet

I am getting the error as Fatal error: One or more hosts failed while executing task 'disable_puppet' Aborting. while running the fab command in bastion server to disable puppet in xyz server.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

暮色兮凉城 2025-01-18 21:29:10

对于每个新会话,您都必须添加 *id_rsa 键。

只需运行命令 ssh-add ~/.ssh/id_rsa 即可添加密钥,即 ssh-add ~/path to your key.

如果出现错误,无法打开与您的身份验证代理的连接。
这是因为您的 ssh-agent 未运行,因此要运行 ssh-agent,只需输入命令 eval ssh-agent -sssh-agent -s 应该位于反引号 ( ' ) 内,位于波浪号 ( ~ ) 下方,而不是单引号 ( <强>' )。
它应该适用于使用 zsh 的 ubuntu 或 mac,并且 bash 可以运行 exec ssh-agent bash

然后,只需添加密钥 ssh-add ~/.ssh/id_rsa 和您的结构命令 fab -P -H xyzdisable_puppet 应该可以工作。

For every new session, you have to add the *id_rsa keys.

Just add the key by running the command ssh-add ~/.ssh/id_rsa i.e. ssh-add ~/path to your key.

If getting error as Could not open a connection to your authentication agent.
and that's because your ssh-agent is not running so to run the ssh-agent, just give the command eval ssh-agent -s and ssh-agent -s should be inside the backquote ( ' ), located under the tilde ( ~ ), rather than the single quote ( ' ).
It should work for ubuntu or mac that use zsh and for bash can run exec ssh-agent bash

Then, just add the key ssh-add ~/.ssh/id_rsa and your fabric command fab -P -H xyz disable_puppet should work.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文