linux – Ansible的受管节点上是否需要SSH SFTP子系统才能工作?

linux – Ansible的受管节点上是否需要SSH SFTP子系统才能工作?,第1张

概述当我跑: ansible all -a "/bin/echo hello" -u myuser 我回来了: mydomain.myhost.com | FAILED => failed to open a SFTP connection (Channel closed.) 我正在尝试连接的受管节点上禁用SFTP子系统. 受管节点上是否需要SFTP? Ansible文档没有特别提到SFTP:http 当我跑:
ansible all -a "/bin/echo hello" -u myuser

我回来了:

mydomain.myhost.com | Failed => Failed to open a SFTP connection (Channel closed.)

我正在尝试连接的受管节点上禁用SFTP子系统.

受管节点上是否需要SFTP? Ansible文档没有特别提到SFTP:http://docs.ansible.com/intro_installation.html#managed-node-requirements

我尝试在ansible.cfg中设置this value:

scp_if_ssh=True

……但它没有效果. (感谢Fred the Magic Wonder Dog for the suggestion.)

我还确保我的非交互式shell不会产生任何输出as suggested here.

解决方法 是的,ansible取决于能够将文件传输到远程计算机.默认情况下,它使用sftp执行此 *** 作.您可以覆盖它以使用scp
scp_if_sshOccasionally users may be managing a remote system that doesn’t have SFTP enabled. If set to True,we can cause scp to be used to transfer remote files instead:scp_if_ssh=FalseThere’s really no reason to change this unless problems are encountered,and then there’s also no real drawback to managing the switch. Most environments support SFTP by default and this doesn’t usually need to be changed.

以上信息摘自本页:

http://docs.ansible.com/intro_configuration.html#openssh-specific-settings

总结

以上是内存溢出为你收集整理的linux – Ansible的受管节点上是否需要SSH SFTP子系统才能工作?全部内容,希望文章能够帮你解决linux – Ansible的受管节点上是否需要SSH SFTP子系统才能工作?所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: http://www.outofmemory.cn/yw/1040019.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-24
下一篇 2022-05-24

发表评论

登录后才能评论

评论列表(0条)

保存