Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #66689
| From | Roy Smith <roy@panix.com> |
|---|---|
| Newsgroups | comp.lang.python |
| Subject | Re: SSH/Telnet program to Router/switch |
| Date | 2014-02-19 08:35 -0500 |
| Organization | PANIX Public Access Internet and UNIX, NYC |
| Message-ID | <roy-F02FD5.08350019022014@news.panix.com> (permalink) |
| References | <d343f9af-54f2-4709-9a99-1ad5708c1f34@googlegroups.com> |
In article <d343f9af-54f2-4709-9a99-1ad5708c1f34@googlegroups.com>, Sujith S <sujiths80@gmail.com> wrote: > Hi, > > I am new to programming and python. I am looking for a python script to do > ssh/telnet to a network equipment ? I know tcl/perl does this using > expect/send. > > Do we have expect available in python as well or need to use some other > method ? You want two libraries. First, the low-level paramiko (http://www.lag.net/paramiko/) which handles all the basic ssh connection stuff. Next, fabric (http://docs.fabfile.org/en/1.8/), which layers a very easy to use application layer on top of paramiko. Fabric is most commonly used in conjunction with a near command-line driver tool called fab, but you can also work directly with the library layer (http://docs.fabfile.org/en/1.8/usage/library.html). Fabric rocks. Don't waste your time with anything else (but see the next paragraph). As far as I know, fabric only works with ssh. If you are forced to use telnet to talk to legacy equipment, that's another problem.
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
SSH/Telnet program to Router/switch Sujith S <sujiths80@gmail.com> - 2014-02-19 00:14 -0800
Re: SSH/Telnet program to Router/switch Chris Angelico <rosuav@gmail.com> - 2014-02-19 19:45 +1100
Re: SSH/Telnet program to Router/switch Wojciech Łysiak <wojciech.lysiak@hotmail.com> - 2014-02-19 09:45 +0100
Re: SSH/Telnet program to Router/switch Ferrous Cranus <nikos.gr33k@gmail.com> - 2014-02-20 02:59 -0800
Re: SSH/Telnet program to Router/switch Rodrick Brown <rodrick.brown@gmail.com> - 2014-02-25 07:53 -0500
Re: SSH/Telnet program to Router/switch Johannes Schneider <johannes.schneider@galileo-press.de> - 2014-02-19 11:36 +0100
Re: SSH/Telnet program to Router/switch Roy Smith <roy@panix.com> - 2014-02-19 08:35 -0500
Re: SSH/Telnet program to Router/switch Chris Angelico <rosuav@gmail.com> - 2014-02-20 00:58 +1100
Re: SSH/Telnet program to Router/switch Roy Smith <roy@panix.com> - 2014-02-19 09:13 -0500
Re: SSH/Telnet program to Router/switch William Ray Wing <wrw@mac.com> - 2014-02-19 09:27 -0500
csiph-web