Ansible
Ansible Documentation
fanne
V2EX  ›  Ansible

ansible 有没有关于 passphrase 的配置的

  •  
  •   fanne · Feb 27, 2019 · 4686 views
    This topic created in 2643 days ago, the information mentioned may be changed or developed.

    公司服务器登入使用了秘钥+passphrase 方式

    现在 ansible 连接管理服务器也是通过自己的秘钥+passphrase 进行操作

    我看了文档,里面有关于关于秘钥路径的参数ansible_ssh_private_key_file

    不知道秘钥+passphrase 要如何处理?

    3 replies    2019-05-10 14:26:13 +08:00
    julyclyde
        1
    julyclyde  
       Feb 28, 2019
    你试试用 ssh-agent 解决吧
    lestat
        2
    lestat  
       May 10, 2019
    我也是遇到同样问题,不知如何解决,我的情况是 ansible 作为 docker 容器运行
    lestat
        3
    lestat  
       May 10, 2019
    使用
    ```
    eval `ssh-agent -s`
    ssh-add key
    ```
    的方法当时可以有效,但在重启容器后又不行了,暂时没找到方法把 ssh-add 的结果持久化
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   3653 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 62ms · UTC 04:46 · PVG 12:46 · LAX 21:46 · JFK 00:46
    ♥ Do have faith in what you're doing.