Hi David, I am trying this script for a device at my job that only supports Telnet, it is an old Cisco 2950 switch. But i cannot get it to work, it prompts me for username and pw in which i input those 2 values but after that it just hangs and would return a time out socket error of some sort and would not execute the commands. Can you provide some insight as to how i can troubleshoot this? Please let me know if you need more details. I worked along this example in your course using the GNS3 lab environment and got it to work, but i am not sure why I cant get it to work in my production environment.
@meseee14 жыл бұрын
David , I have attempted to reach you from udamy course as well. After following every step I got an error that says " syntaxerror: invalid syntax ...line 24 print (tn.read_all().decode('ascii')). my question is does this telnet script work in different setup other than the network automation docker. I just used linux ubuntu connected to router tested telnet and communication, but pyhon script retuned the above. I am just starting to study python.
@saurabhmadhavi48933 жыл бұрын
Even I having the same setup and facing the same issue.
@AVNetworkGuy2 жыл бұрын
Try using: print(tn.read_all().decode())
@lj7466 жыл бұрын
Hi! I see the course calls for GNS3. I have VIRL setup and running in my home PC. Could I take the Python for Network Engineering Udemy class and use my VIRL set up instead of GNS3? Please advise. Thanks!
@davidbombal6 жыл бұрын
VIRL, physical equipment or GNS3 could be used in the course. No requirement to have GNS3.
@sumonpaul33764 жыл бұрын
David Sir, I'm face a problem. Python script run of physical machine and i want output in gns3 c3400 series router. But of my physical machine script run but i don’t show any output. Like that python script don’t asked me telnet user name or password. But i am not using loopback interface. But i am ping to Both side my pc to gns3 router. Please sir give me some solution.
@aligohar87375 жыл бұрын
I am good but David is Genius
@davidbombal5 жыл бұрын
lol... thank you! But, not sure I am an genius, just a normal guy.
@HoangVo76 жыл бұрын
in windows 10, we can use linux subsystem by downloading ubuntu from microsoft store. Is there any way to telnet from ubuntu-in-win10 to router in gns3?
@deepakbagade94376 жыл бұрын
Hi, David!! I am trying to run the scripts in production environment, nothing is happening!!, not even getting an error. The same script runs well in gns3. Please advice is there anything extra we need to do in order to make the script run on production devices.
@RashidMehmud15 жыл бұрын
Hi Deepak, did you figure out, why its not doing any action on real device? i am having the same issue.
@haitran14065 жыл бұрын
Hi Deepak, I am having same issue. Did you ever figure this out?
@jacklee265 жыл бұрын
How to not exit Cisco router on python.just telnet in server and stop.
@GustavoNiederauer6 жыл бұрын
I copy exactly the same, I can put the username , but the prompt for password does not appear. what could be?
@andrewcoleman37416 жыл бұрын
Does the sections where it's creating the password variable, and the "if password" section match up with what David created (or could there be some empty whitespaces?)?
@christopherlyon85216 жыл бұрын
Usually when entering a telnet password, the entry field is hidden. Just type it as normal, and press enter. You can't see it, but it's there.
@kenmurphy42596 жыл бұрын
Great video David. Can you do a video in your upcoming series detailing how to make your Python scripts idempotent like Ansible for subsequent runs of the script against a set of devices. Thanks again.
@davidbombal6 жыл бұрын
Ken, this is already part of my Python course. It will also be in the new course.
@kenmurphy42596 жыл бұрын
Thank you David, much appreciated. Really looking forward to the new course. Your training for Python and Ansible has opened up new avenues for me. Invaluable!
@profetaII6 жыл бұрын
does getpass works in python3?
@andrewcoleman37416 жыл бұрын
From the python documentation site, it looks like you can, but I'm no programmer, so take that with a boulder of salt. docs.python.org/3.6/library/getpass.html