garyalen
V2EX  ›  macOS

macos 上的 ansible 问题

  •  
  •   garyalen · May 25 · 2205 views
    遇到一个很奇怪的问题 macos 上跑 ansible 总是随机会出现 ssh 连接失败的问题:
    UNREACHABLE! => {"changed": false, "msg": "Failed to connect to the host via ssh: Warning: Permanently added '[10.251.32.11]:10000' (ED25519) to the list of known hosts.\r\n** WARNING: connection is not using a post-quantum key exchange algorithm.\r\n** This session may be vulnerable to \"store now, decrypt later\" attacks.\r\n** The server may need to be upgraded. See https://openssh.com/pq.html\r\n\nAuthorized users only. All activities may be monitored and reported.\nPermission denied, please try again.\r\nPermission denied, please try again.\r\[email protected]: Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password).", "unreachable": true}

    出现很随机的 每次不一定是哪一个或者间隔时间出现。inventory 里加了重试或者不验证密钥或者-f 1 也试过了。brew 装的 ansible pipx 安装的 ansible 换过版本 都无法解决。 同时网络问题也排除 本地直连和隧道的都会出现。
    Supplement 1  ·  May 25
    已解决 key 重试次数导致的拒绝

    加入
    host_key_checking = False

    -o IdentitiesOnly=yes -o ControlMaster=no -o ControlPersist=no

    解决
    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1489 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 21ms · UTC 17:00 · PVG 01:00 · LAX 10:00 · JFK 13:00
    ♥ Do have faith in what you're doing.