Petrucci Andreas
2009-12-04 05:15:16 UTC
Hi everyone, i just joined the list and being newbie I have 2 questions.
1) I am running a never ending script that every 5 seconds make a SSH connection to different hosts. All work (almost) excellent but sometimes the script stops showing me this error :
No handlers could be found for logger "paramiko.transport"
Traceback (most recent call last):
File "myfile.py", line 156, in <module>
client.connect(node, username='MYUSERNAME', password='MYPASSWORD', key_filename='.../key',timeout=50)
File "/usr/lib/pymodules/python2.6/paramiko/client.py", line 288, in connect
t.start_client()
File "/usr/lib/pymodules/python2.6/paramiko/transport.py", line 440, in start_client
raise e
paramiko.SSHException: Error reading SSH protocol banner
The crucial code is below:
client = paramiko.SSHClient()
client.load_system_host_keys()
client.set_missing_host_key_policy(paramiko.AutoAddPolicy())
try:
client.connect(node, username='MYUSERNAME', password='MYPASSWORD', key_filename='.../key',timeout=50)
except paramiko.SSHException, socket.error :
print "connect error"
continue
Any ideas?
2)I have established a SSH connection with a remote host, can I transfer a file from this host to me without opening a new connection from the remote host to me? Is there a way doing this with paramiko?
Thanks in advance,
Andreas
_________________________________________________________________
Windows Live: Friends get your Flickr, Yelp, and Digg updates when they e-mail you.
http://www.microsoft.com/middleeast/windows/windowslive/see-it-in-action/social-network-basics.aspx?ocid=PID23461::T:WLMTAGL:ON:WL:en-xm:SI_SB_3:092010
1) I am running a never ending script that every 5 seconds make a SSH connection to different hosts. All work (almost) excellent but sometimes the script stops showing me this error :
No handlers could be found for logger "paramiko.transport"
Traceback (most recent call last):
File "myfile.py", line 156, in <module>
client.connect(node, username='MYUSERNAME', password='MYPASSWORD', key_filename='.../key',timeout=50)
File "/usr/lib/pymodules/python2.6/paramiko/client.py", line 288, in connect
t.start_client()
File "/usr/lib/pymodules/python2.6/paramiko/transport.py", line 440, in start_client
raise e
paramiko.SSHException: Error reading SSH protocol banner
The crucial code is below:
client = paramiko.SSHClient()
client.load_system_host_keys()
client.set_missing_host_key_policy(paramiko.AutoAddPolicy())
try:
client.connect(node, username='MYUSERNAME', password='MYPASSWORD', key_filename='.../key',timeout=50)
except paramiko.SSHException, socket.error :
print "connect error"
continue
Any ideas?
2)I have established a SSH connection with a remote host, can I transfer a file from this host to me without opening a new connection from the remote host to me? Is there a way doing this with paramiko?
Thanks in advance,
Andreas
_________________________________________________________________
Windows Live: Friends get your Flickr, Yelp, and Digg updates when they e-mail you.
http://www.microsoft.com/middleeast/windows/windowslive/see-it-in-action/social-network-basics.aspx?ocid=PID23461::T:WLMTAGL:ON:WL:en-xm:SI_SB_3:092010