Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!feeder.erje.net!eu.feeder.erje.net!xlned.com!feeder5.xlned.com!newsfeed.xs4all.nl!newsfeed2.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.031 X-Spam-Evidence: '*H*': 0.94; '*S*': 0.00; 'python.': 0.02; 'python': 0.11; 'windows': 0.15; 'ssh': 0.16; 'subject:program': 0.16; 'wrote:': 0.18; 'module': 0.19; 'programming': 0.22; 'shell': 0.22; 'header:User-Agent:1': 0.23; 'received:65.55.116': 0.24; 'script': 0.25; 'subject:/': 0.26; 'header:In-Reply-To:1': 0.27; 'linux.': 0.31; 'received:192.168.10': 0.31; 'google': 0.35; 'method': 0.36; 'hi,': 0.36; 'to:addr:python-list': 0.38; 'expect': 0.39; 'does': 0.39; 'to:addr:python.org': 0.39; 'commands': 0.60; 'equipment': 0.61; 'new': 0.61; 'from:charset:utf-8': 0.61; 'br,': 0.84 X-TMN: [4K7wOPB0Q+WumGwomQbLvkQN5zXiMA9c] X-Originating-Email: [wojciech.lysiak@hotmail.com] Date: Wed, 19 Feb 2014 09:45:53 +0100 From: =?UTF-8?B?V29qY2llY2ggxYF5c2lhaw==?= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 MIME-Version: 1.0 To: python-list@python.org Subject: Re: SSH/Telnet program to Router/switch References: In-Reply-To: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 19 Feb 2014 08:45:54.0939 (UTC) FILETIME=[006614B0:01CF2D4F] X-Mailman-Approved-At: Wed, 19 Feb 2014 09:53:27 +0100 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 17 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1392800009 news.xs4all.nl 2956 [2001:888:2000:d::a6]:50255 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:66678 On 19.02.2014 09:14, Sujith S 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 ? Hello, If you are looking for a way to connect to your netdevices and then execute some shell commands (with output) via ssh then google for paramiko module for python. It works on windows and linux. -- BR, Wojtek