Hello, everybody
I using python 2.7 with paramiko module, I have to run some commands at remote servers
So, look at my script
when I run script I get some error
How I can get around this error?
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()
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'