I have been using python since the last few months. I am trying to telnet into one router and then telnet into another router from the first router. I know how to use telnetlib to telnet into a router but I have no clue on how I should proceed if I need to telnet into 2 routers at teh same time.

I am working on a Windows PC. I heard of a expect module but don't know what to do. Any suggestions will be really appreciated.


9 Years
Discussion Span
Last Post by leegeorg07

Ok, just to make sure I understand, you're running on computer A and can telnet to computer B. You want computer B to telnet to computer C?

Why not telnet from computer A to computer C directly?

If the above A -> B -> C scenario is what you're trying to do, you will need to 'convince' computer B to telnet to computer C. I suspect that you will either have to run the 'standard' telnet application on computer B, or run another program on computer B that achieves the same goal. If it was necessary, you could probably even 'create' a python file on computer B and run it to establish the connection to computer C. The options available to you could be limited by the access granted to your connection to computer B.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.