Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #95481

Re: execute commands as su on remote server

Path csiph.com!eternal-september.org!feeder.eternal-september.org!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed7.news.xs4all.nl!nzpost1.xs4all.net!not-for-mail
Return-Path <lac@openend.se>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.003
X-Spam-Evidence '*H*': 0.99; '*S*': 0.00; 'cc:addr:python-list': 0.09; 'creighton': 0.09; 'naturally': 0.09; 'received:openend.se': 0.09; 'received:theraft.openend.se': 0.09; 'runs,': 0.09; 'question.': 0.13; 'wed,': 0.15; 'cc:addr:lac': 0.16; 'cc:addr:openend.se': 0.16; '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; '2015': 0.20; 'cc:addr:python.org': 0.20; 'aug': 0.20; 'cc:2**2': 0.20; 'pass': 0.22; 'this:': 0.23; "haven't": 0.24; 'tried': 0.24; 'cc:addr:gmail.com': 0.24; 'thus': 0.24; 'command': 0.26; 'entered': 0.27; '+0200,': 0.27; 'looks': 0.29; '**kwargs)': 0.29; 'host.': 0.29; 'received:se': 0.29; 'url:mailman': 0.30; 'somebody': 0.30; 'run': 0.33; 'url:python': 0.33; 'url:listinfo': 0.34; 'so,': 0.35; '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; 'url:mail': 0.40; '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; 'cc:no real name:2**2': 0.91; 'url:core': 0.91; 'url:latest': 0.91
To Laura Creighton <lac@openend.se>
cc harirammanohar159@gmail.com, python-list@python.org, lac@openend.se
From Laura Creighton <lac@openend.se>
Subject Re: execute commands as su on remote server
In-reply-to <201508190844.t7J8irDJ001699@fido.openend.se>
References <a6b3da0b-d9be-4241-8577-85aafca72440@googlegroups.com> <fa8fe84e-23fa-4616-b4a9-03dda6dc4396@googlegroups.com> <201508190844.t7J8irDJ001699@fido.openend.se>
Comments In-reply-to Laura Creighton <lac@openend.se> message dated "Wed, 19 Aug 2015 10:44:53 +0200."
MIME-Version 1.0
Content-Type text/plain; charset="us-ascii"
Content-ID <3332.1439974316.1@fido>
Content-Transfer-Encoding quoted-printable
Date Wed, 19 Aug 2015 10:51:56 +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:51:58 +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 <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.6.1439974325.28100.python-list@python.org> (permalink)
Lines 34
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1439974325 news.xs4all.nl 23856 [2001:888:2000:d::a6]:56453
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:95481

Show key headers only | View raw


In a message of Wed, 19 Aug 2015 10:44:53 +0200, Laura Creighton writes:
>I haven't tried this but fabric looks encouraging:
>
>>From http://docs.fabfile.org/en/latest/api/core/operations.html#fabric.operations.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=False 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
>-- 
>https://mail.python.org/mailman/listinfo/python-list

And now that I started looking, I found this:
http://stackoverflow.com/questions/12641514/switch-to-different-user-using-fabric

so, somebody got it to work ...

Laura

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

execute commands as su on remote server harirammanohar159@gmail.com - 2015-08-17 19:57 -0700
  Re: execute commands as su on remote server Chris Angelico <rosuav@gmail.com> - 2015-08-18 13:06 +1000
  Re: execute commands as su on remote server harirammanohar159@gmail.com - 2015-08-18 23:58 -0700
  Re: execute commands as su on remote server harirammanohar159@gmail.com - 2015-08-19 00:02 -0700
    Re: execute commands as su on remote server Laura Creighton <lac@openend.se> - 2015-08-19 10:44 +0200
    Re: execute commands as su on remote server Laura Creighton <lac@openend.se> - 2015-08-19 10:51 +0200
  Re: execute commands as su on remote server harirammanohar159@gmail.com - 2015-09-01 05:16 -0700
    Re: execute commands as su on remote server Laura Creighton <lac@openend.se> - 2015-09-01 15:25 +0200
  Re: execute commands as su on remote server Antoon Pardon <antoon.pardon@rece.vub.ac.be> - 2015-09-02 09:05 +0200
  Re: execute commands as su on remote server harirammanohar159@gmail.com - 2015-10-01 00:10 -0700

csiph-web