# How do I use openSSH instead of paramiko (i.e. no connection:local) for IOS modules?

**URL:** <https://forum.ansible.com/t/how-do-i-use-openssh-instead-of-paramiko-i-e-no-connection-local-for-ios-modules/22613>\
**Category:** Ansible Project\
**Created:** [September 22, 2016, 5:40am UTC](https://forum.ansible.com/t/how-do-i-use-openssh-instead-of-paramiko-i-e-no-connection-local-for-ios-modules/22613 "2016-09-22T05:40:23Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Johann\_Lo](https://avatars.discourse-cdn.com/v4/letter/j/8baadc/32.png) [@Johann\_Lo](https://forum.ansible.com/u/Johann_Lo)\
**Post date:** [September 22, 2016, 5:40am UTC](https://forum.ansible.com/t/how-do-i-use-openssh-instead-of-paramiko-i-e-no-connection-local-for-ios-modules/22613/1 "2016-09-22T05:40:23Z")

</div>

I’m trying to use the ios networking modules (ios\_config, ios\_template etc.) and the only way I can get them to work properly is via connection: local and passing the parameters to each task via something like this

- hosts: all  
connection: local  
gather\_facts: no

tasks:

- name: define provider  
set\_fact:  
provider:  
host: “{{ inventory\_hostname }}”  
username: “{{ username }}”  
password: “{{ password }}”  
auth\_pass: “{{ auth\_pass }}”  
authorize: “{{ authorize }}”  
backup: “{{ backup }}”

1.) Is there a way to use standard SSH AND pass the ios module specific parameters such as auth\_pass? Whatever I do, whether I place the username, password or auth\_pass variables in inventory, play or host variables, it ignores them and connects with no user.

2.) Using the current method I understand its paramiko under the hood. This has a MAJOR problem where each task keeps its SSH connection open and does not close it. How do I get it to close the SSH connection and not fill uip my devices? This is a major issue as network devices normally restrict to several concurrent connections.

Note this is also relevant to the Arista (EOS) templates.

Thanks

---

<div class="post-metadata">

**Author:** ![psprygada](https://avatars.discourse-cdn.com/v4/letter/p/898d66/32.png) [@psprygada](https://forum.ansible.com/u/psprygada)\
**Post date:** [September 22, 2016, 9:14pm UTC](https://forum.ansible.com/t/how-do-i-use-openssh-instead-of-paramiko-i-e-no-connection-local-for-ios-modules/22613/2 "2016-09-22T21:14:15Z")

</div>

The short answer is you don’t.

Traditional network devices that dump an authenticated session to the “CLI” effectively prevent you from being able to use OpenSSH as a programmable transport in the way that is implemented for other systems.

WRT point #2. SSH connections being made by network modules _should_ be cleaning up the connections behind themselves. If that is not the case, then its a bug and we need to get it fixed.
