我来这里是为了回到有关交换机Extreme Network上的设备的问题。 目前,Extreme Network会询问提示是否未保存交换机。我目前正在开发一个脚本来验证公园中的所有交换机是否都受到保护。
以下是我的开始:
s = pxssh.pxssh()
hostname = ('hostname')
username = ('username')
password = ('password')
s.login (hostname, username, password)
唯一的问题是我的代码的最后一行,我收到以下错误消息:
In [93]: s.login (hostname, username, password)
---------------------------------------------------------------------------
TIMEOUT Traceback (most recent call last)
/root/<ipython-input-93-6a124c6a47a0> in <module>()
----> 1 s.login (hostname, username, password)
/usr/lib/python2.7/dist-packages/pxssh.pyc in login(self, server, username, password, terminal_type, original_prompt, login_timeout, port, auto_prompt_reset)
241 self.close()
242 raise ExceptionPxssh ('unexpected login response')
--> 243 if not self.synch_original_prompt():
244 self.close()
245 raise ExceptionPxssh ('could not synchronize with original prompt')
/usr/lib/python2.7/dist-packages/pxssh.pyc in synch_original_prompt(self)
132 # If latency is worse than these values then this will fail.
133
--> 134 self.read_nonblocking(size=10000,timeout=1) # GAS: Clear out the cache before getting the prompt
135 time.sleep(0.1)
136 self.sendline()
/usr/lib/python2.7/dist-packages/pexpect.pyc in read_nonblocking(self, size, timeout)
822 raise EOF ('End of File (EOF) in read_nonblocking(). Very pokey platform.')
823 else:
--> 824 raise TIMEOUT ('Timeout exceeded in read_nonblocking().')
825
826 if self.child_fd in r:
TIMEOUT: Timeout exceeded in read_nonblocking().
你有什么想法吗?
谢谢