Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: Execute Perl script on Remote server without any CPAN module

by FloydATC (Chaplain)
on Jan 29, 2014 at 11:10 UTC ( #1072480=note: print w/ replies, xml ) Need Help??


in reply to Execute Perl script on Remote server without any CPAN module

... it seems it do not have reference to the script and can perform any other line of code after doing ssh to the specific server ...

In the absence of detailed info, I'll make a few assumptions and have some fun guessing :-)

If your script simply uses the ssh command to execute shell commands, Perl isn't really the challenge but rather how good you are at extracting information using shell one-liners. Then you can process that information in your local Perl script.

If, on the other hand, you are trying to remote into a host using ssh to execute a local copy of a Perl script, you will first have to make sure a local copy of that Perl script exists on the remote host. You will probably want to look into both "scp" (copy files via SSH)."

In either case, you'll probably want to look into how to set up password-less (key based) SSH authentication so you won't have to deal with password prompts etc. But please make sure you understand the security implications of allowing password-less authentication. I'm not saying it's worse than hard-coding passwords in a script, but you have to think it through all the same.


-- FloydATC

Time flies when you don't know what you're doing


Comment on Re: Execute Perl script on Remote server without any CPAN module
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (10)
As of 2014-12-26 17:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (173 votes), past polls