python ssh paramiko

Hello, everybody

I using python 2.7 with paramiko module, I have to run some commands at remote servers
So, look at my script
Code:
#!/usr//bin/env python
# -*- coding: utf-8 -*-
import paramiko
import logging
logging.basicConfig(level=logging.DEBUG)


ssh = paramiko.SSHClient()
ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
ssh.get_transport()
ssh.connect(u"x.x.x.x", username=u"root", password=u"123456")
stdin,stdout,stderr = ssh.exec_command(u"ls -l /")
data = stdout.read() + stderr.read()
ssh.close()
when I run script I get some error
Code:
No handlers could be found for logger "paramiko.transport"
Traceback (most recent call last):
  File "sshGetDB.sh", line 11, in <module>
    ssh.connect(u"x.x.x.x", username=u"root", password=u"123456")
  File "build/bdist.freebsd-9.0-RELEASE-i386/egg/paramiko/client.py", line 302, in connect
  File "build/bdist.freebsd-9.0-RELEASE-i386/egg/paramiko/transport.py", line 464, in start_client
AttributeError: 'module' object has no attribute 'find'
How I can get around this error?
 
In my Paramiko, line 464 is a comment and start_client for sure doesn't use any find.
Could you add a link to the code that you use?
 
link to the transport.py or client.py& You saw that in your paramiko, line 464 is comment so tell me what version of your Paramiko and what version of your Python and what version of your FreeBSD?
 
I don't get it...aren't we supposed to solve your problem? It doesn't matter what's on my machine, what matters is yours.
 
Back
Top