How Network Modules using openssh controlpersist feature?

56 views
Skip to first unread message

jacky....@gmail.com

unread,
Sep 20, 2016, 2:32:41 PM9/20/16
to Ansible Project
I find that the Network Modules must use paramiko, does paramiko support openssh ControlPersist similar feature?


building ssh connection by paramiko: Code in module_util/shell.py

def open(self, host, port=22, username=None, password=None,
timeout=10, key_filename=None, pkey=None, look_for_keys=None,
allow_agent=False):

self.ssh = paramiko.SSHClient()
self.ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())

Peter Sprygada

unread,
Sep 20, 2016, 3:26:33 PM9/20/16
to ansible...@googlegroups.com
No, there is no support for ControlPersist (or similar) in the paramiko library.

--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-project+unsubscribe@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/ed3f80a3-35b1-4eb7-a344-e38bfac76165%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

jacky....@gmail.com

unread,
Sep 21, 2016, 1:27:04 PM9/21/16
to Ansible Project

If I want to use openssh ControlPersist function or similar feature, I can't use module_util/shell.y & basic.y, I have to write myself basc library? 

Is there any other featuca to avoid SSH authentication for each task?

在 2016年9月21日星期三 UTC+8上午3:26:33,Peter Sprygada写道:
No, there is no support for ControlPersist (or similar) in the paramiko library.
On Tue, Sep 20, 2016 at 9:48 AM, <jacky....@gmail.com> wrote:
I find that the Network Modules must use paramiko, does paramiko support openssh ControlPersist similar feature?


building ssh connection by paramiko: Code in module_util/shell.py

def open(self, host, port=22, username=None, password=None,
timeout=10, key_filename=None, pkey=None, look_for_keys=None,
allow_agent=False):

self.ssh = paramiko.SSHClient()
self.ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())

--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.

Peter Sprygada

unread,
Sep 22, 2016, 5:22:46 PM9/22/16
to ansible...@googlegroups.com
If I want to use openssh ControlPersist function or similar feature, I can't use module_util/shell.y & basic.y, I have to write myself basc library?  

> Yes, it would require a completely new SSH library (or changes to paramiko) to support the same functionality as ControlPersist.  The updates would also have to account for each channel being able to invoke an emulated shell connection.


Is there any other featuca to avoid SSH authentication for each task?

> Yes, for devices that provide alternative API transports such as eAPI for EOS or NXAPI for NXOS (HTTP based transports).  Unfortunately the number of devices that support alternative transports are very few and it doesn't really solve the authentication problem.

To unsubscribe from this group and stop receiving emails from it, send an email to ansible-project+unsubscribe@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/372cd5ca-b24f-4342-9b92-7e2f9af8a4b6%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages