Path: csiph.com!usenet.pasdenom.info!news.redatomik.org!newsfeed.xs4all.nl!newsfeed8.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.001 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'bash': 0.07; 'cc:addr :python-list': 0.09; 'received:openend.se': 0.09; 'received:theraft.openend.se': 0.09; 'python': 0.10; 'anyway': 0.11; 'thursday,': 0.13; 'subject:python': 0.14; 'thu,': 0.15; "'at": 0.16; '>in': 0.16; '>on': 0.16; 'cc:addr:lac': 0.16; 'cc:addr:openend.se': 0.16; 'convey': 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:fido': 0.16; 'received:fido.openend.se': 0.16; 'subject:login': 0.16; "time'": 0.16; 'wrote:': 0.16; 'instance,': 0.18; 'laura': 0.18; 'ssl': 0.18; 'all,': 0.20; '2015': 0.20; 'cc:addr:python.org': 0.20; 'suggested': 0.20; 'machine': 0.21; 'cc:2**1': 0.22; 'advance.': 0.23; 'script': 0.25; 'earlier': 0.27; 'logging': 0.27; 'separate': 0.27; 'this.': 0.28; '-0700,': 0.29; 'fork': 0.29; 'received:se': 0.29; 'cc:no real name:2**1': 0.29; 'you?': 0.30; 'post': 0.31; 'problem': 0.33; 'url:python': 0.33; 'machine.': 0.33; 'could': 0.35; 'done': 0.35; 'remote': 0.35; 'there': 0.36; 'url:org': 0.36; 'url:library': 0.36; 'subject:: ': 0.37; 'two': 0.37; 'say': 0.37; 'thanks': 0.37; 'charset:us-ascii': 0.37; 'sure': 0.39; 'takes': 0.39; 'still': 0.40; 'called': 0.40; 'url:3': 0.60; 'your': 0.60; 'hope': 0.61; 'skip:u 10': 0.61; 'header:Message-Id:1': 0.61; 'email addr:gmail.com': 0.62; 'more': 0.63; 'url:4': 0.70; 'header:In-reply-to:1': 0.84; 'utc+5:30,': 0.84; 'activity,': 0.91 To: harirammanohar159@gmail.com cc: python-list@python.org, lac@openend.se From: Laura Creighton Subject: Re: reg multiple login python In-reply-to: References: <2fe53246-4212-4cfd-896b-acf8e8e88b09@googlegroups.com> Comments: In-reply-to harirammanohar159@gmail.com message dated "Thu, 01 Oct 2015 03:07:14 -0700." MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <32313.1443702398.1@fido> Content-Transfer-Encoding: quoted-printable Date: Thu, 01 Oct 2015 14:26:38 +0200 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.3.9 (theraft.openend.se [82.96.5.2]); Thu, 01 Oct 2015 14:26:40 +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: 52 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1443702414 news.xs4all.nl 23766 [2001:888:2000:d::a6]:48578 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:97279 In a message of Thu, 01 Oct 2015 03:07:14 -0700, harirammanohar159@gmail.c= om wr ites: >On Thursday, 1 October 2015 12:35:01 UTC+5:30, hariramm...@gmail.com wro= te: >> Hi All, >> = >> Is there anyway i can login to remote servers at once and do the activi= ty, i can do one by one using for loop.. >> = >> Thanks in advance. > >Hi Laura, > >at the same time means... >i have an activity say on two servers serverA and serverB, my aim is to d= o the activity using script by logging in to both servers serverA and serv= erB at the same time and not one by one. hope this time i am able to conve= y :) > >in earlier post the way you suggested will work only as one by one.. > >Thanks. I am still not understanding. Is your problem that you don't want to wait for the script to be done on machine A before you go to machine B? fork a separate process for each machine. You could even do this in, for instance, a bash shell. Given a script called myscript.py that takes a machine name as an argument= . for machine in `cat list_of_machines` do python --machine $machine myscript.py & done = if you need to do this inside python see os.fork https://docs.python.org/3.4/library/os.html and make sure you read about the problems with ssl if you care. https://docs.python.org/3.4/library/ssl.html#module-ssl Most people don't need any more 'at the same time' than this. Do you? Laura