Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re^7: Advice on running perl program over ssh

by salva (Canon)
on Jul 16, 2014 at 06:30 UTC ( [id://1093795]=note: print w/replies, xml ) Need Help??


in reply to Re^6: Advice on running perl program over ssh
in thread Advice on running perl program over ssh

Is there anyway to suppress this kind of stuff?

There is not a unique right solution for that. Some programs allow to disable their splash screen using some flag on the command line or from the configuration file.

You can run Xvfb and set is as the target X server.

So i now have about a hundred seperate shell scripts i need to run over ssh! How do i do that with the method discussed?

Have you considered using some module like Net::OpenSSH?

Replies are listed 'Best First'.
Re^8: Advice on running perl program over ssh
by Amblikai (Scribe) on Jul 16, 2014 at 08:39 UTC

    I didn't know about Net::OpenSSH. I'll definitely be looking into that. It means i'll need to install modules locally though which i haven't done before. Any good tutorials on doing that?

    Is there a way in the meantime of running all the shell scripts through SSH in a bash script for example?

      I am confused, on the main post on this thread you said you run everything locally, and that you can install modules there but now you say you have never done that. Is that right?

      Which OS/distribution are you running on your machine? Net::OpenSSH is available as a native package for several Linux distributions (Debian, Ubuntu, Fedora, etc.). Otherwise you can install it running the CPAN client as root:

      # cpan Net::OpenSSH
      In case you can't be root, there are several other approaches, for instance, using local::lib.

        Yeah sorry for the confusion. Up until now i had to ask our sysadmin to install modules for me. They sometimes take ages to do it and i hadn't ever tried installing them locally until now. I'd still prefer to run my scripts on my local machine though, rather than try to install modules on the remote machine/LSF.

Re^8: Advice on running perl program over ssh
by Amblikai (Scribe) on Jul 16, 2014 at 09:09 UTC

    Ignore my last reply! I've now got Net::OpenSSH installed locally. That was easy!

    Now i just have to figure out how to use it! Any pointers or sample scripts?

    Thanks!

      The synopsis shows the most important things. To start learning how to use new, capture2 and error is enough and quite straight forward.

      There is a samples directory on the distribution, though, they are for advanced topics.

        Ok Thanks very much Salva

        I have it working, however I now have a new problem it seems!

        I have it working for normal commands such as ls, cd etc. But how do i read stdin to execute a local script as described above?

        The following doesn't work:

        $ssh->system("tcsh < script1.tcsh") or die "Remote command failed: ".£ +ssh->error;

        It appears to be looking for "script1.tcsh" on the remote machine which is not what i want.

        Also, how would i get more that one script to run in parallel?

        Thanks for your help, it's very much appreciated!

      Unsurprisingly there are sample scripts in the sample directory.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1093795]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (5)
As of 2024-04-18 15:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found