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.

Thanks!

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.

Member Avatar for leegeorg07

i think that hes trying to create a sort of p2p software to save time and effort

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.