Path: csiph.com!eternal-september.org!feeder.eternal-september.org!border1.nntp.ams1.giganews.com!nntp.giganews.com!newsfeed.xs4all.nl!newsfeed8.news.xs4all.nl!news.tele.dk!news.tele.dk!small.news.tele.dk!newsgate.cistron.nl!newsgate.news.xs4all.nl!nzpost1.xs4all.net!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.007 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'cc:addr:python-list': 0.09; 'naturally': 0.09; 'received:openend.se': 0.09; 'received:theraft.openend.se': 0.09; 'runs,': 0.09; 'question.': 0.13; 'from:addr:lac': 0.16; 'from:addr:openend.se': 0.16; 'from:name:laura creighton': 0.16; 'message-id:@fido.openend.se': 0.16; 'received:89.233': 0.16; 'received:89.233.217': 0.16; 'received:89.233.217.133': 0.16; 'received:fido': 0.16; 'received:fido.openend.se': 0.16; 'subject:server': 0.16; 'laura': 0.18; 'shell': 0.18; 'cc:2**0': 0.20; 'cc:addr:python.org': 0.20; 'pass': 0.22; 'cc:no real name:2**0': 0.22; "haven't": 0.24; 'tried': 0.24; 'thus': 0.24; 'command': 0.26; 'entered': 0.27; 'looks': 0.29; '**kwargs)': 0.29; 'host.': 0.29; 'received:se': 0.29; 'run': 0.33; 'text': 0.35; 'interact': 0.35; 'remote': 0.35; 'but': 0.36; 'url:org': 0.36; 'forwarded': 0.36; 'subject:: ': 0.37; 'charset:us-ascii': 0.37; 'creation': 0.38; 'presence': 0.38; 'end': 0.39; 'url:en': 0.39; 'your': 0.60; 'header:Message- Id:1': 0.61; 'received:89': 0.80; 'header:In-reply-to:1': 0.84; 'subject:commands': 0.84; 'url:api': 0.84; 'url:core': 0.91; 'url:latest': 0.91 To: harirammanohar159@gmail.com cc: python-list@python.org From: Laura Creighton Subject: Re: execute commands as su on remote server In-reply-to: References: Comments: In-reply-to harirammanohar159@gmail.com message dated "Wed, 19 Aug 2015 00:02:06 -0700." MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1697.1439973893.1@fido> Content-Transfer-Encoding: quoted-printable Date: Wed, 19 Aug 2015 10:44:53 +0200 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.3.9 (theraft.openend.se [89.233.217.130]); Wed, 19 Aug 2015 10:44:56 +0200 (CEST) X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.20+ 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: 22 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1439973900 news.xs4all.nl 23854 [2001:888:2000:d::a6]:53623 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:95480 I haven't tried this but fabric looks encouraging: =46rom http://docs.fabfile.org/en/latest/api/core/operations.html#fabric.o= perations.run fabric.operations.run(*args, **kwargs) Run a shell command on a remote host. ... Any text entered in your local terminal will be forwarded to the remote program as it runs, thus allowing you to interact with password or other prompts naturally ... You may pass pty=3DFalse to forego creation of a pseudo-terminal on the remote end in case the presence of one causes problems for the command in question. Laura