# How to connect Cisco ASA

**URL:** <https://forum.ansible.com/t/how-to-connect-cisco-asa/9582>\
**Category:** Get Help\
**Created:** [September 30, 2024, 9:05am UTC](https://forum.ansible.com/t/how-to-connect-cisco-asa/9582 "2024-09-30T09:05:25Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![williamluotao](https://avatars.discourse-cdn.com/v4/letter/w/bcef8e/32.png) [@williamluotao](https://forum.ansible.com/u/williamluotao)\
**Post date:** [September 30, 2024, 9:05am UTC](https://forum.ansible.com/t/how-to-connect-cisco-asa/9582/1 "2024-09-30T09:05:25Z")

</div>

## My playbook:

- name: Show version for the ASA  
gather\_facts: false  
hosts: ASA\_FW  
vars:  
ansible\_network\_os: cisco.asa.asa  
ansible\_connection: ansible.netcommon.network\_cli  
ansible\_ssh\_extra\_args: “-o KexAlgorithms=+diffie-hellman-group1-sha1”  
tasks:
  - name: Show the ASA version  
cisco.asa.asa\_command:  
commands:
    - show version  
register: output

  - name: Display the running configuration  
debug:  
var: output.stdout\_lines

The error message:  
{  
“module\_stdout”: “”,  
“module\_stderr”: “ssh connection failed: ssh connect failed: kex error : no match for method kex algos: server [diffie-hellman-group1-sha1], client [curve25519-sha256,curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group14-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1]”,  
“msg”: “MODULE FAILURE\nSee stdout/stderr for the exact error”,  
“\_ansible\_no\_log”: null,  
“changed”: false  
}

---

<div class="post-metadata">

**Author:** ![jiholland](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/jiholland/32/11273_2.png) [@jiholland](https://forum.ansible.com/u/jiholland)\
**Post date:** [September 30, 2024, 9:47am UTC](https://forum.ansible.com/t/how-to-connect-cisco-asa/9582/2 "2024-09-30T09:47:24Z")

</div>

Welcome to the forum!  
You can try switching to paramiko, which should support the diffie-hellman-group1-sha1 KEX algorithm.

```yaml
- name: Show version for the ASA
  gather_facts: false
  hosts: ASA_FW
  vars:
    ansible_network_os: cisco.asa.asa
    ansible_connection: ansible.netcommon.network_cli
    ansible_network_cli_ssh_type: paramiko

```

---

<div class="post-metadata">

**Author:** ![williamluotao](https://avatars.discourse-cdn.com/v4/letter/w/bcef8e/32.png) [@williamluotao](https://forum.ansible.com/u/williamluotao)\
**Post date:** [September 30, 2024, 10:06am UTC](https://forum.ansible.com/t/how-to-connect-cisco-asa/9582/3 "2024-09-30T10:06:08Z")

</div>

You’re terrific. I thought about using paramiko, like this ansible\_connection: paramiko, but I didn’t expect to use ansible\_network\_cli\_ssh\_type: paramiko, very appreciated.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/ansible/original/1X/1882d9a01da5d8996a862359b0913cc568a39b84.svg) [@system](https://forum.ansible.com/u/system)\
**Post date:** [October 30, 2024, 10:06am UTC](https://forum.ansible.com/t/how-to-connect-cisco-asa/9582/4 "2024-10-30T10:06:33Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
