【发布时间】:2022-08-07 04:36:59
【问题描述】:
我有这个命令,它基本上只是从设备中获取数据。
- name: Get data
tags: get_facts
ios_command:
commands:
- show version
register: ruijie_sh_interfaces
vars:
ansible_command_timeout: 90
ansible_connection: network_cli
ansible_network_os: ios
但是在 AWX 塔上运行这个剧本时它给了我这个错误。
\"msg\": \"Error reading SSH protocol banner[Errno 104] Connection reset by peer\"
我知道ssh user@ip 无法访问此设备,它输出:
Unable to negotiate with <IP> port 22: no matching key exchange method found. Their offer: diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1
但是可以使用ssh -oKexAlgorithms=+diffie-hellman-group1-sha1 user@ip
我想知道如何在 ansible 中使用network_cli 连接类型来实现-oKexAlgorithms=+diffie-hellman-group1-sha1。
-
所以你的问题似乎只是一个Ansible SSH connection error,可以通过在你的库存中设置
ansible_ssh_common_args来解决。 -
由于您使用的是
network_cli,因此Parameters 对您来说可能也很有趣。
标签: ansible ansible-awx cisco-ios