且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Ansible:SSH错误:unix_listener:对于Unix域套接字太长

更新时间:2023-02-20 18:06:32

限制为104或108个字符。 (我在网络上找到了不同的语句)。

The limit is 104 or 108 characters. (I found different statements on the web)

您在错误消息中XXX删除了一些敏感信息,因此不清楚您的路径实际上有多久。

You XXXed out some sensitive information in the error message so it's not clear how long your path actually is.

我想%(directory)s 被替换为 .ansible 目录在您的用户文件夹中。删除它并直接使用您的用户文件夹将为您节省12个字符:

I guess %(directory)s is replaced with the .ansible directory in your users folder. Removing that and using directly your user folder would save you 12 characters:

control_path=~/%%h‐%%r

当然,这会通过控制套接字向您的主目录发送垃圾邮件。

根据用户名的实际长度,您可以看到是否可以创建另一个目录或在任何地方找到更短的路径。例如,我使用〜/ .ssh / tmp / %% h _ %% r

Depending on the actual length of your username, you could see if you can just create another directory or find a shorter path anywhere. For example, I use ~/.ssh/tmp/%%h_%%r

仅少3个字符

最后,如果没有帮助,您仍然可以使用 / tmp 进行存储插座。但是请注意,任何有权访问该计算机上的 / tmp 的人都可以使用您的套接字。

Finally if none of that helps, you still could fall back using /tmp for storing the sockets. But be aware that anyone with access to /tmp on that machine might be able to use your sockets then.