I am trying to do ssh on a remote machine using a python script using pxssh moudule.
Here are the lines of code that I use for the same :
s = pxssh.pxssh()
s.login (hostip,'root',auto_prompt_reset=False)
But this gives me the following TIMEOUT error.
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python2.6/dist-packages/pxssh.py", line 243, in login
if not self.synch_original_prompt():
File "/usr/local/lib/python2.6/dist-packages/pxssh.py", line 134, in synch_original_prompt
self.read_nonblocking(size=10000,timeout=1) # GAS: Clear out the cache before getting the prompt
File "/usr/local/lib/python2.6/dist-packages/pexpect.py", line 824, in read_nonblocking
raise TIMEOUT ('Timeout exceeded in read_nonblocking().')
pexpect.TIME
OUT: Timeout exceeded in read_nonblocking().