2010-08-27 63 views
-1
The code i have given is 
import telnetlib 
HOST="X" 
user ="X" 
password="X" 
en_password="x" 

tn=telnetlib.Telnet(HOST) 




Traceback (most recent call last): 
     File "<pyshell#15>", line 1, in <module> 
     tn=telnetlib.Telnet(HOST) 
     File "C:\Python27\lib\telnetlib.py", line 209, in __init__ 
     self.open(host, port, timeout) 
     File "C:\Python27\lib\telnetlib.py", line 225, in open 
     self.sock = socket.create_connection((host, port), timeout) 
     File "C:\Python27\lib\socket.py", line 567, in create_connection 
     raise error, msg 
    error: [Errno 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond 

這是我正在嘗試連接到2600路由器時,我正在得到的錯誤。如何刪除此錯誤,並通過python腳本連接到路由器?錯誤,試圖通過在Windows中的python連接到思科2600路由器

回答

0

這是一個連接超時 - 如果您沒有其他網絡問題,那麼它只是簡單地說,路由器不接受默認telnet端口上的連接。你確定你可以通過端口23連接嗎?你可以使用telnet客戶端連接嗎?