python - Pexpect ssh option StrictHostKeyChecking raising TypeError -


i have python script ssh device using pexpect module. runs following

$ ssh hostname -l username 

by doing:

>>> import pexpect.pxssh pxssh >>> conn = pxssh.pxssh() >>> conn.login(hostname, username, password, terminal_type='vt100') >>> ... 

now, trying implemement same script stricthostkeychecking=no option. in order this, follow documentation of pexpect , add options={} below. however, raises following typeerror.

>>> import pexpect.pxssh pxssh >>> conn = pxssh.pxssh(options={'stricthostkeychecking':'no',}) exception attributeerror: "'pxssh' object has no attribute 'closed'" in <bound method pxssh.__del__ of <pexpect.pxssh.pxssh object @ 0x7f96294aded0>> ignored traceback (most recent call last):   file "<stdin>", line 1, in <module> typeerror: __init__() got unexpected keyword argument 'options' 

i have had around , not find solution problem. known problem, , if is, there hack?

my setup following:

>>> print pexpect.__version__ 3.1 

which seems last version as

$ apt-cache policy python-pexpect python-pexpect:   installed: 3.1-1ubuntu0.1   candidate: 3.1-1ubuntu0.1 


Comments

Popular posts from this blog

angularjs - ADAL JS Angular- WebAPI add a new role claim to the token -

php - CakePHP HttpSockets send array of paramms -

node.js - Using Node without global install -