question regarding how to launch perl script on remote machine
  Home FAQ Contact Sign in
perl.beginners only
 
Advanced search
POPULAR GROUPS

more...

perl.beginners Profile…
 Up
question regarding how to launch perl script on remote machine         


Author: Richard Lee
Date: May 18, 2008 20:22

so just to put it out there for my ideas to run more perl scripts at
work using modules that I cannot install(whether due to lack of
knoweldge or just don't have
the right)..

at work, we have a solaris based unix server(lets say serverK) which is
being served as central logon for all the daily tasks.
I don't have root right and I have tried many things to install some
modules that I wanted to run(DBI,Expect among other things) but could no
make it work..
I also have list of linux machine behind serverK, called linux1-4 which
btw cannot reach any of other servers out
there(server1/server2/server3.........etc)
I DO have root right in linux machines and I am installing all the
modules that I know I want to use..
Show full article (1.67Kb)
8 Comments
Re: question regarding how to launch perl script on remote machine         


Author: Rodrick Brown
Date: May 18, 2008 21:11

You can install modules locally into say ~/perllib and set PERL5LIB
accordingly this works very well if you're home directory is also nfs
mounted on each server.

On Sun, May 18, 2008 at 11:22 PM, Richard Lee gmail.com> wrote:
> so just to put it out there for my ideas to run more perl scripts at work
> using modules that I cannot install(whether due...
Show full article (2.22Kb)
no comments
Re: question regarding how to launch perl script on remote machine         


Author: Chas. Owens
Date: May 18, 2008 21:16

On Sun, May 18, 2008 at 11:22 PM, Richard Lee gmail.com> wrote:
> so just to put it out there for my ideas to run more perl scripts at work
> using modules that I cannot install(whether due to lack of knoweldge or just
> don't have
> the right)..
snip

So long as you have write access to a directory you can install Perl
modules. You just need to say

perl Makefile.PL PREFIX=/path/to/dir

if you install by hand or setup your CPAN configuration correctly if
you use CPAN. You will also want to either use the lib* pragma or set
the PERL5LIB environmental variable to point to the directory where
you are installing the modules.

* See perldoc lib or http://perldoc.perl.org/lib.html

--
Chas. Owens
wonkden.net
The most important skill a programmer can have is the ability to read.
no comments
Re: question regarding how to launch perl script on remote machine         


Author: Jeff Peng
Date: May 19, 2008 06:55

On Mon, May 19, 2008 at 11:22 AM, Richard Lee gmail.com> wrote:
> I have thought of writing a simple shell script which launchs a (from
> SERVERK)ssh session into linux machines using user name with initial script
> to run a perl script and logs off..

Is this possible? I don't think so.
This will run the script on that remote linux host, not the current
solaris host.

--
Jeff Peng - Peng.Kyo@Gmail.com
Professional Squid supports in China
http://www.ChinaSquid.com/
no comments
Re: question regarding how to launch perl script on remote machine         


Author: Matthew Whipple
Date: May 19, 2008 07:01

On Mon, 2008-05-19 at 21:55 +0800, Jeff Peng wrote:
> On Mon, May 19, 2008 at 11:22 AM, Richard Lee gmail.com> wrote:
>
>> I have thought of writing a simple shell script which launchs a (from
>> SERVERK)ssh session into linux machines using user name with initial script
>> to run a perl script and logs off..
>
> Is this possible? I don't think so.
> This will run the script on that remote linux host, not the current
> solaris host.
>

It sounded as though he wanted to run the script on the Linux machine,
not the server...perhaps remotely storing login information which could
be retrieved from the server's environment before initiating the SSH
connection.
Show full article (0.80Kb)
no comments
Re: question regarding how to launch perl script on remote machine         


Author: Jeff Peng
Date: May 19, 2008 07:08

On Mon, May 19, 2008 at 10:01 PM, Matthew Whipple
kothartech.com> wrote:
>
> It sounded as though he wanted to run the script on the Linux machine,
> not the server...

That was maybe not correct.
Given the case that he say something like this in his script:

open $pwd, "/etc/passwd" or die $!;

This will open the linux's password file, not the solaris's.

If that was really he wanted originally, then using Net::SSH::Expect
has no problems.

--
Jeff Peng - Peng.Kyo@Gmail.com
Professional Squid supports in China
http://www.ChinaSquid.com/
2 Comments
Re: question regarding how to launch perl script on remote machine         


Author: Matthew Whipple
Date: May 19, 2008 07:32

On Mon, 2008-05-19 at 22:08 +0800, Jeff Peng wrote:
> On Mon, May 19, 2008 at 10:01 PM, Matthew Whipple
> kothartech.com> wrote:
>>
>> It sounded as though he wanted to run the script on the Linux machine,
>> not the server...
>
> That was maybe not correct.
> Given the case that he say something like this in his script:
>
> open $pwd, "/etc/passwd" or die $!;
>
> This will open the linux's password file, not the solaris's.

That would depend upon which side that command was executed. Keep in
mind that he had mentioned a script that would iniate the SSH connection
from the Solaris computer and could retrieve data from that computer
which could then be passed over the connection.
Show full article (1.43Kb)
no comments
Re: question regarding how to launch perl script on remote machine         


Author: Richard Lee
Date: May 19, 2008 08:35

Matthew Whipple wrote:
> That would depend upon which side that command was executed. Keep in
> mind that he had mentioned a script that would iniate the SSH connection
> from the Solaris computer and could retrieve data from that computer
> which could then be passed over the connection.
>
> I unfortunately no longer have the original message and don't have time
> to find it, but I had noticed that one of the problem modules he was
> having was DBI so I was supposing he was looking to store login
> information in a DB. In that case he would be able to gather login
> information on the "SERVERK" computer before initiating the SSH
> connection and passing the information to a script which would handle
> any functionality not presently supported on SERVERK (not to be
> confused with permission). The only person to answer this is the OP,
> and he may not if the alternative module installation prefix works for
> him.
>
>
ok so let's say on SERVERK, I cannot install any modules(no root access
and different compilers, gcc(I have tried perlgcc but to no success), ...
Show full article (1.77Kb)
no comments
RE: question regarding how to launch perl script on remote machine         


Author: Bob McConnell
Date: May 19, 2008 08:48

From: Richard Lee
> ok so let's say on SERVERK, I cannot install any modules(no root
access
> and different compilers, gcc(I have tried perlgcc but to no success),
> and other
> reasons that I cannot explain nor understand and after numerous
> attempts(installing my own dir and others), I have gave up. Also since
> this is production machine
> which has other users using other things, any destruction behavior
would
> be catastrophic.

Never develop nor experiment on production systems. A mistake here could
wipe out your employer and result in criminal charges against you.

Step 1: Set up a clone of SERVERK to use as a development environment.

Step 2: Once this is done, if this is indeed an official project, get
the system admin to set up the correct tools and permissions on
the clone to build the application you need.
Show full article (1.67Kb)
no comments

RELATED THREADS
SubjectArticles qty Group
Harmony Remote og Apple Remotedk.edb.mac ·